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 763294717f948..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java +++ /dev/null @@ -1,686 +0,0 @@ -// Copyright (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.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.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.DataVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.DatastoresImpl; -import com.azure.resourcemanager.machinelearning.implementation.EnvironmentContainersImpl; -import com.azure.resourcemanager.machinelearning.implementation.EnvironmentVersionsImpl; -import com.azure.resourcemanager.machinelearning.implementation.JobsImpl; -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.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.DataVersions; -import com.azure.resourcemanager.machinelearning.models.Datastores; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; -import com.azure.resourcemanager.machinelearning.models.Jobs; -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.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 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 Jobs jobs; - - private ModelContainers modelContainers; - - private ModelVersions modelVersions; - - private OnlineEndpoints onlineEndpoints; - - private OnlineDeployments onlineDeployments; - - 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.0.0-beta.2"); - 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 WorkspaceConnection. - * - * @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 BatchEndpoints. It manages BatchEndpointData. - * - * @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 BatchDeploymentData. - * - * @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 CodeContainerData. - * - * @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 CodeVersionData. - * - * @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 ComponentContainerData. - * - * @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 ComponentVersionData. - * - * @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 DataContainerData. - * - * @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 DataVersionBaseData. - * - * @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 DatastoreData. - * - * @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 EnvironmentContainerData. - * - * @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 EnvironmentVersionData. - * - * @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 Jobs. It manages JobBaseData. - * - * @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 ModelContainers. It manages ModelContainerData. - * - * @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 ModelVersionData. - * - * @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 OnlineEndpointData. - * - * @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 OnlineDeploymentData. - * - * @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 WorkspaceFeatures. - * - * @return Resource collection API of WorkspaceFeatures. - */ - public WorkspaceFeatures workspaceFeatures() { - if (this.workspaceFeatures == null) { - this.workspaceFeatures = new WorkspaceFeaturesImpl(clientObject.getWorkspaceFeatures(), this); - } - return workspaceFeatures; - } - - /** - * @return Wrapped service client AzureMachineLearningWorkspaces providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. - */ - 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 431d49bfc7f19..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.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.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 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 JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * 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 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 cfc4d11cfdb4e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchDeploymentsClient.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (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.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialTrackedResource; - -/** 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - BatchDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * 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); - - /** - * 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, BatchDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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, BatchDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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) - BatchDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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) - BatchDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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, BatchDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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, BatchDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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) - BatchDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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) - BatchDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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 5b61e1422061f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java +++ /dev/null @@ -1,320 +0,0 @@ -// Copyright (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.BatchEndpointDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; - -/** 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * 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); - - /** - * 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, BatchEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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, BatchEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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) - BatchEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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) - BatchEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner 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, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner 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) - BatchEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner 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) - BatchEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); -} 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 03d7ba0721bec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.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.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.CodeContainerDataInner; - -/** 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(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) - CodeContainerDataInner get(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); - - /** - * 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) - CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context); -} 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 da65902f46c42..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.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.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.CodeVersionDataInner; - -/** 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - 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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - 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) - CodeVersionDataInner get(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); - - /** - * 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) - CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionDataInner body, - Context context); -} 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 eb2edf8ff6813..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentContainersClient.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.ComponentContainerDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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) - ComponentContainerDataInner get(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); - - /** - * 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) - ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner 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. - * @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, ComponentContainerDataInner body, Context context); -} 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 a1f3e0bae9ecb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.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.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.ComponentVersionDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @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); - - /** - * 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) - ComponentVersionDataInner get(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); - - /** - * 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) - ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner 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. - * @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, - ComponentVersionDataInner 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 59109ed677d35..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComputesClient.java +++ /dev/null @@ -1,555 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); - - /** - * 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 533a6f679bbbb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.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.DataContainerDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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) - DataContainerDataInner get(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); - - /** - * 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) - DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner 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. - * @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, DataContainerDataInner body, Context context); -} 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 f7aa9b60dbda8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.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.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.DataVersionBaseDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @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); - - /** - * 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) - DataVersionBaseDataInner get(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); - - /** - * 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) - DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner 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. - * @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, - DataVersionBaseDataInner 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 039579d9f50f2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.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.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.DatastoreDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 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); - - /** - * 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) - DatastoreDataInner get(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); - - /** - * 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) - DatastoreDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body); - - /** - * 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, - DatastoreDataInner body, - Boolean skipValidation, - 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); - - /** - * 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); -} 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 2585f01d46cdd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.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.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.EnvironmentContainerDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(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) - EnvironmentContainerDataInner get(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); - - /** - * 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) - EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context); -} 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 ee7be12767add..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.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.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.EnvironmentVersionDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - 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) - EnvironmentVersionDataInner get(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); - - /** - * 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) - EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body); - - /** - * 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, - EnvironmentVersionDataInner 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 6d280d7c1f6f9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.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.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.JobBaseDataInner; -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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId, - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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) - JobBaseDataInner get(String resourceGroupName, String workspaceName, String id); - - /** - * 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); - - /** - * Creates and executes a 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) - JobBaseDataInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseDataInner body); - - /** - * Creates and executes a 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, JobBaseDataInner body, Context context); - - /** - * Cancels a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response cancelWithResponse(String resourceGroupName, String workspaceName, String id, 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 78142802c0e57..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.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.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.ModelContainerDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(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) - ModelContainerDataInner get(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); - - /** - * 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) - ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context); -} 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 317537e9c8439..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.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; - -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.ModelVersionDataInner; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - 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) - ModelVersionDataInner get(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); - - /** - * 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) - ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionDataInner 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 46bea196ac72d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineDeploymentsClient.java +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright (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.OnlineDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeploymentPartialTrackedResource; - -/** 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - OnlineDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * 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); - - /** - * 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, OnlineDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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, OnlineDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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) - OnlineDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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) - OnlineDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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, OnlineDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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, OnlineDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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) - OnlineDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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) - OnlineDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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); - - /** - * 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); - - /** - * 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 7dfed8a382a26..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright (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.OnlineEndpointDataInner; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpointPartialTrackedResource; -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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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) - OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * 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); - - /** - * 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, OnlineEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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, OnlineEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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) - OnlineEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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) - OnlineEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner 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, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner 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) - OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner 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) - OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); - - /** - * 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 AAD 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); - - /** - * Retrieve a valid AAD 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); -} 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 cf8b8217b3035..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OperationsClient.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.AmlOperationInner; - -/** 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 an array of operations supported by the 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 an array of operations supported by the 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 33c18711080d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateEndpointConnectionsClient.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); -} 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 1da61216f1a5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); -} 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 7d2b47c28da76..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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/UsagesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java deleted file mode 100644 index e51b16de1b3d9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.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.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 aea1510cb2e15..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/VirtualMachineSizesClient.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); -} 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 9f057a3dd81f8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.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.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.WorkspaceConnectionInner; - -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ -public interface WorkspaceConnectionsClient { - /** - * List all connections under a AML 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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); - - /** - * Add a new workspace connection. - * - * @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 workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters); - - /** - * Add a new workspace connection. - * - * @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 workspace connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner parameters, - Context context); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * Delete a workspace connection. - * - * @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); - - /** - * Delete a workspace connection. - * - * @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); -} 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 9c67243899aba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceFeaturesClient.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.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 6ebfdab961a34..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java +++ /dev/null @@ -1,610 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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, 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. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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); - - /** - * 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. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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 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 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java deleted file mode 100644 index 1c37228282055..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Machine Learning workspace REST API operation. */ -@Fluent -public final class AmlOperationInner { - /* - * Operation name: {provider}/{resource}/{operation} - */ - @JsonProperty(value = "name") - private String name; - - /* - * Display name of operation - */ - @JsonProperty(value = "display") - private AmlOperationDisplay display; - - /* - * Indicates whether the operation applies to data-plane - */ - @JsonProperty(value = "isDataAction") - private Boolean isDataAction; - - /** - * Get the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Operation name: {provider}/{resource}/{operation}. - * - * @param name the name value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the display property: Display name of operation. - * - * @return the display value. - */ - public AmlOperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display name of operation. - * - * @param display the display value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withDisplay(AmlOperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @param isDataAction the isDataAction value to set. - * @return the AmlOperationInner object itself. - */ - public AmlOperationInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } -} diff --git a/sdk/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 62790155c6056..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Features enabled for a workspace. */ -@Fluent -public final class AmlUserFeatureInner { - /* - * Specifies the feature ID - */ - @JsonProperty(value = "id") - private String id; - - /* - * Specifies the feature name - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Describes the feature for user experience - */ - @JsonProperty(value = "description") - private String description; - - /** - * 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() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentDataInner.java deleted file mode 100644 index 5df9352b3489c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentDataInner.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.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The BatchDeploymentData model. */ -@Fluent -public final class BatchDeploymentDataInner extends Resource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private BatchDeploymentDetails properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 BatchDeploymentDataInner object itself. - */ - public BatchDeploymentDataInner 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 BatchDeploymentDataInner object itself. - */ - public BatchDeploymentDataInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchDeploymentDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchDeploymentDataInner object itself. - */ - public BatchDeploymentDataInner withProperties(BatchDeploymentDetails properties) { - this.properties = properties; - 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 BatchDeploymentDataInner object itself. - */ - public BatchDeploymentDataInner 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; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDataInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDataInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model BatchDeploymentDataInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointDataInner.java deleted file mode 100644 index 2dc693909a68e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointDataInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The BatchEndpointData model. */ -@Fluent -public final class BatchEndpointDataInner extends Resource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private BatchEndpointDetails properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /** - * 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 BatchEndpointDataInner object itself. - */ - public BatchEndpointDataInner 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 BatchEndpointDataInner object itself. - */ - public BatchEndpointDataInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchEndpointDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchEndpointDataInner object itself. - */ - public BatchEndpointDataInner withProperties(BatchEndpointDetails properties) { - this.properties = properties; - 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 BatchEndpointDataInner object itself. - */ - public BatchEndpointDataInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDataInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDataInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model BatchEndpointDataInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointDataInner.class); -} 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 842fae9579e36..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a amlCompute that need to be updated. */ -@Fluent -public final class ClusterUpdateProperties { - /* - * Properties of ClusterUpdate - */ - @JsonProperty(value = "properties") - private ScaleSettingsInformation properties; - - /** - * 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(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerDataInner.java deleted file mode 100644 index 1b06f986e32fe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerDataInner.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.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.resourcemanager.machinelearning.models.CodeContainerDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class CodeContainerDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private CodeContainerDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeContainerDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeContainerDataInner object itself. - */ - public CodeContainerDataInner withProperties(CodeContainerDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model CodeContainerDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeContainerDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionDataInner.java deleted file mode 100644 index 1e72fd1951911..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionDataInner.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.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.resourcemanager.machinelearning.models.CodeVersionDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class CodeVersionDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private CodeVersionDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeVersionDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeVersionDataInner object itself. - */ - public CodeVersionDataInner withProperties(CodeVersionDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model CodeVersionDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerDataInner.java deleted file mode 100644 index c947da16fd561..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerDataInner.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.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.resourcemanager.machinelearning.models.ComponentContainerDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ComponentContainerDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ComponentContainerDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentContainerDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentContainerDataInner object itself. - */ - public ComponentContainerDataInner withProperties(ComponentContainerDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ComponentContainerDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionDataInner.java deleted file mode 100644 index ba2ad30514b2f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionDataInner.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.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.resourcemanager.machinelearning.models.ComponentVersionDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ComponentVersionDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ComponentVersionDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentVersionDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentVersionDataInner object itself. - */ - public ComponentVersionDataInner withProperties(ComponentVersionDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ComponentVersionDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionDataInner.class); -} 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 0f32186478b97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -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. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /* - * Compute properties - */ - @JsonProperty(value = "properties") - private Compute properties; - - /** - * 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; - } - - /** - * 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(); - } - } -} 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 6afbda4264ae3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.models.AksComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.DatabricksComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSecrets; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute. Might differ for every type of compute. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = ComputeSecretsInner.class) -@JsonTypeName("ComputeSecrets") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AKS", value = AksComputeSecrets.class), - @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachineSecrets.class), - @JsonSubTypes.Type(name = "Databricks", value = DatabricksComputeSecrets.class) -}) -@Immutable -public class ComputeSecretsInner { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.java deleted file mode 100644 index aafdd395ffc83..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerDataInner.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.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.resourcemanager.machinelearning.models.DataContainerDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DataContainerDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DataContainerDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataContainerDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataContainerDataInner object itself. - */ - public DataContainerDataInner withProperties(DataContainerDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model DataContainerDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseDataInner.java deleted file mode 100644 index 6d31b402f3d69..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseDataInner.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.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.resourcemanager.machinelearning.models.DataVersionBaseDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DataVersionBaseDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DataVersionBaseDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataVersionBaseDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataVersionBaseDataInner object itself. - */ - public DataVersionBaseDataInner withProperties(DataVersionBaseDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model DataVersionBaseDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreDataInner.java deleted file mode 100644 index befaa4c64e74c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreDataInner.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.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.resourcemanager.machinelearning.models.DatastoreDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DatastoreDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DatastoreDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DatastoreDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DatastoreDataInner object itself. - */ - public DatastoreDataInner withProperties(DatastoreDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model DatastoreDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreDataInner.class); -} 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 936757cf5fe25..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreSecretsInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.CertificateDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.KerberosKeytabSecrets; -import com.azure.resourcemanager.machinelearning.models.KerberosPasswordSecrets; -import com.azure.resourcemanager.machinelearning.models.SasDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for datastore secrets. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "secretsType", - defaultImpl = DatastoreSecretsInner.class) -@JsonTypeName("DatastoreSecrets") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreSecrets.class), - @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreSecrets.class), - @JsonSubTypes.Type(name = "KerberosKeytab", value = KerberosKeytabSecrets.class), - @JsonSubTypes.Type(name = "KerberosPassword", value = KerberosPasswordSecrets.class), - @JsonSubTypes.Type(name = "Sas", value = SasDatastoreSecrets.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreSecrets.class) -}) -@Immutable -public class DatastoreSecretsInner { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f1b036e62efa9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DeploymentLogs model. */ -@Fluent -public final class DeploymentLogsInner { - /* - * The retrieved online deployment logs. - */ - @JsonProperty(value = "content") - private String content; - - /** - * 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() { - } -} 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 9df052e9356e1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResultValue; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DiagnoseResponseResult model. */ -@Fluent -public final class DiagnoseResponseResultInner { - /* - * The value property. - */ - @JsonProperty(value = "value") - private DiagnoseResponseResultValue value; - - /** - * 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(); - } - } -} 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 6e69c444913f1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Keys for endpoint authentication. */ -@Fluent -public final class EndpointAuthKeysInner { - /* - * The primary key. - */ - @JsonProperty(value = "primaryKey") - private String primaryKey; - - /* - * The secondary key. - */ - @JsonProperty(value = "secondaryKey") - private String secondaryKey; - - /** - * 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() { - } -} 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 d3be23560e2ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Service Token. */ -@Fluent -public final class EndpointAuthTokenInner { - /* - * Access token for endpoint authentication. - */ - @JsonProperty(value = "accessToken") - private String accessToken; - - /* - * Access token expiry time (UTC). - */ - @JsonProperty(value = "expiryTimeUtc") - private Long expiryTimeUtc; - - /* - * Refresh access token after time (UTC). - */ - @JsonProperty(value = "refreshAfterTimeUtc") - private Long refreshAfterTimeUtc; - - /* - * Access token type. - */ - @JsonProperty(value = "tokenType") - private String tokenType; - - /** - * 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 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 dd1ad8649f64c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (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.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Inference Endpoint base definition. */ -@Fluent -public class EndpointPropertiesBaseInner { - /* - * [Required] Use 'Key' for key based authentication and 'AMLToken' for - * Azure Machine Learning token-based authentication. 'Key' doesn't expire - * but 'AMLToken' does. - */ - @JsonProperty(value = "authMode", required = true) - private EndpointAuthMode authMode; - - /* - * Description of the inference endpoint. - */ - @JsonProperty(value = "description") - private String description; - - /* - * EndpointAuthKeys to set initially on an Endpoint. - * This property will always be returned as null. AuthKey values must be - * retrieved using the ListKeys API. - */ - @JsonProperty(value = "keys") - private EndpointAuthKeysInner keys; - - /* - * Property dictionary. Properties can be added, but not removed or - * altered. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /* - * Endpoint URI. - */ - @JsonProperty(value = "scoringUri", access = JsonProperty.Access.WRITE_ONLY) - private String scoringUri; - - /* - * Endpoint Swagger URI. - */ - @JsonProperty(value = "swaggerUri", access = JsonProperty.Access.WRITE_ONLY) - private String swaggerUri; - - /** - * 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 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 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; - } - - /** - * 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; - } - - /** - * Get the swaggerUri property: Endpoint Swagger URI. - * - * @return the swaggerUri value. - */ - public String swaggerUri() { - return this.swaggerUri; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (authMode() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property authMode in model EndpointPropertiesBaseInner")); - } - if (keys() != null) { - keys().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointPropertiesBaseInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.java deleted file mode 100644 index e0b57af590f22..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerDataInner.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.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.resourcemanager.machinelearning.models.EnvironmentContainerDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class EnvironmentContainerDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private EnvironmentContainerDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentContainerDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentContainerDataInner object itself. - */ - public EnvironmentContainerDataInner withProperties(EnvironmentContainerDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model EnvironmentContainerDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionDataInner.java deleted file mode 100644 index 70dba5130698c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionDataInner.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.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.resourcemanager.machinelearning.models.EnvironmentVersionDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class EnvironmentVersionDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private EnvironmentVersionDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentVersionDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentVersionDataInner object itself. - */ - public EnvironmentVersionDataInner withProperties(EnvironmentVersionDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model EnvironmentVersionDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionDataInner.class); -} 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 82967b52287db..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ExternalFqdnResponse model. */ -@Fluent -public final class ExternalFqdnResponseInner { - /* - * The value property. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseDataInner.java deleted file mode 100644 index 45a01d708025b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseDataInner.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.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.resourcemanager.machinelearning.models.JobBaseDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class JobBaseDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private JobBaseDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public JobBaseDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the JobBaseDataInner object itself. - */ - public JobBaseDataInner withProperties(JobBaseDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model JobBaseDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobBaseDataInner.class); -} 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 b96547c4398c1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ListNotebookKeysResult model. */ -@Immutable -public final class ListNotebookKeysResultInner { - /* - * The primaryAccessKey property. - */ - @JsonProperty(value = "primaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) - private String primaryAccessKey; - - /* - * The secondaryAccessKey property. - */ - @JsonProperty(value = "secondaryAccessKey", access = JsonProperty.Access.WRITE_ONLY) - private String secondaryAccessKey; - - /** - * 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() { - } -} 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 bbe7061f8f137..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ListStorageAccountKeysResult model. */ -@Immutable -public final class ListStorageAccountKeysResultInner { - /* - * The userStorageKey property. - */ - @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageKey; - - /** - * 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() { - } -} 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 baa903c6b104d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.models.RegistryListCredentialsResult; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ListWorkspaceKeysResult model. */ -@Immutable -public final class ListWorkspaceKeysResultInner { - /* - * The userStorageKey property. - */ - @JsonProperty(value = "userStorageKey", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageKey; - - /* - * The userStorageResourceId property. - */ - @JsonProperty(value = "userStorageResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String userStorageResourceId; - - /* - * The appInsightsInstrumentationKey property. - */ - @JsonProperty(value = "appInsightsInstrumentationKey", access = JsonProperty.Access.WRITE_ONLY) - private String appInsightsInstrumentationKey; - - /* - * The containerRegistryCredentials property. - */ - @JsonProperty(value = "containerRegistryCredentials", access = JsonProperty.Access.WRITE_ONLY) - private RegistryListCredentialsResult containerRegistryCredentials; - - /* - * The notebookAccessKeys property. - */ - @JsonProperty(value = "notebookAccessKeys", access = JsonProperty.Access.WRITE_ONLY) - private ListNotebookKeysResultInner notebookAccessKeys; - - /** - * 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(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.java deleted file mode 100644 index cf087cc22b9a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerDataInner.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.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.resourcemanager.machinelearning.models.ModelContainerDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ModelContainerDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ModelContainerDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelContainerDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelContainerDataInner object itself. - */ - public ModelContainerDataInner withProperties(ModelContainerDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ModelContainerDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelContainerDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionDataInner.java deleted file mode 100644 index 270dd14edc81c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionDataInner.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.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.resourcemanager.machinelearning.models.ModelVersionDetails; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ModelVersionDataInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ModelVersionDetails properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelVersionDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelVersionDataInner object itself. - */ - public ModelVersionDataInner withProperties(ModelVersionDetails properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model ModelVersionDataInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionDataInner.class); -} 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 7b0aa3e45f8e6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NotebookAccessTokenResult model. */ -@Immutable -public final class NotebookAccessTokenResultInner { - /* - * The notebookResourceId property. - */ - @JsonProperty(value = "notebookResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String notebookResourceId; - - /* - * The hostName property. - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * The publicDns property. - */ - @JsonProperty(value = "publicDns", access = JsonProperty.Access.WRITE_ONLY) - private String publicDns; - - /* - * The accessToken property. - */ - @JsonProperty(value = "accessToken", access = JsonProperty.Access.WRITE_ONLY) - private String accessToken; - - /* - * The tokenType property. - */ - @JsonProperty(value = "tokenType", access = JsonProperty.Access.WRITE_ONLY) - private String tokenType; - - /* - * The expiresIn property. - */ - @JsonProperty(value = "expiresIn", access = JsonProperty.Access.WRITE_ONLY) - private Integer expiresIn; - - /* - * The refreshToken property. - */ - @JsonProperty(value = "refreshToken", access = JsonProperty.Access.WRITE_ONLY) - private String refreshToken; - - /* - * The scope property. - */ - @JsonProperty(value = "scope", access = JsonProperty.Access.WRITE_ONLY) - private String scope; - - /** - * 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() { - } -} 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 0a97035c06652..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.NotebookPreparationError; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NotebookResourceInfo model. */ -@Fluent -public final class NotebookResourceInfoInner { - /* - * The fqdn property. - */ - @JsonProperty(value = "fqdn") - private String fqdn; - - /* - * the data plane resourceId that used to initialize notebook component - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /* - * The error that occurs when preparing notebook. - */ - @JsonProperty(value = "notebookPreparationError") - private NotebookPreparationError notebookPreparationError; - - /** - * 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(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentDataInner.java deleted file mode 100644 index 3f1dae7cf453c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentDataInner.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.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The OnlineDeploymentData model. */ -@Fluent -public final class OnlineDeploymentDataInner extends Resource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private OnlineDeploymentDetails properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 OnlineDeploymentDataInner object itself. - */ - public OnlineDeploymentDataInner 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 OnlineDeploymentDataInner object itself. - */ - public OnlineDeploymentDataInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineDeploymentDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineDeploymentDataInner object itself. - */ - public OnlineDeploymentDataInner withProperties(OnlineDeploymentDetails properties) { - this.properties = properties; - 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 OnlineDeploymentDataInner object itself. - */ - public OnlineDeploymentDataInner 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; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDataInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDataInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model OnlineDeploymentDataInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentDataInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointDataInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointDataInner.java deleted file mode 100644 index 9fad748e05c30..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointDataInner.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.core.management.Resource; -import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The OnlineEndpointData model. */ -@Fluent -public final class OnlineEndpointDataInner extends Resource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private OnlineEndpointDetails properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 OnlineEndpointDataInner object itself. - */ - public OnlineEndpointDataInner 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 OnlineEndpointDataInner object itself. - */ - public OnlineEndpointDataInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineEndpointDetails properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineEndpointDataInner object itself. - */ - public OnlineEndpointDataInner withProperties(OnlineEndpointDetails properties) { - this.properties = properties; - 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 OnlineEndpointDataInner object itself. - */ - public OnlineEndpointDataInner 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; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDataInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDataInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model OnlineEndpointDataInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointDataInner.class); -} 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 62a31cb1a7b9f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright (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.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 com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The Private Endpoint Connection resource. */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 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(); - } - } -} 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 50e448958b640..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the PrivateEndpointConnectProperties. */ -@Fluent -public final class PrivateEndpointConnectionProperties { - /* - * The resource of private end point. - */ - @JsonProperty(value = "privateEndpoint") - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between - * service consumer and provider. - */ - @JsonProperty(value = "privateLinkServiceConnectionState", required = true) - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private PrivateEndpointConnectionProvisioningState provisioningState; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property privateLinkServiceConnectionState in model" - + " PrivateEndpointConnectionProperties")); - } else { - privateLinkServiceConnectionState().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); -} 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 2a568206a7dcb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A list of private link resources. */ -@Fluent -public final class PrivateLinkResourceListResultInner { - /* - * Array of private link resources - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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()); - } - } -} 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 76ae0613005b6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties of a private link resource. */ -@Fluent -public final class PrivateLinkResourceProperties { - /* - * The private link resource group id. - */ - @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) - private String groupId; - - /* - * The private link resource required member names. - */ - @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) - private List requiredMembers; - - /* - * The private link resource Private link DNS zone name. - */ - @JsonProperty(value = "requiredZoneNames") - private List requiredZoneNames; - - /** - * 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() { - } -} 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 055ba0985b784..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.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.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.ResourceName; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The quota assigned to a resource. */ -@Immutable -public final class ResourceQuotaInner { - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Region of the AML workspace in the id. - */ - @JsonProperty(value = "amlWorkspaceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Name of the resource. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private ResourceName name; - - /* - * Limit. The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private QuotaUnit unit; - - /** - * 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: Limit. 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(); - } - } -} 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 138ce37374893..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a shared private link resource. */ -@Fluent -public final class SharedPrivateLinkResourceProperty { - /* - * The resource id that private link links to. - */ - @JsonProperty(value = "privateLinkResourceId") - private String privateLinkResourceId; - - /* - * The private link resource group id. - */ - @JsonProperty(value = "groupId") - private String groupId; - - /* - * Request message. - */ - @JsonProperty(value = "requestMessage") - private String requestMessage; - - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; - - /** - * 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() { - } -} 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 b2f0005ca0110..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Fulfills ARM Contract requirement to list all available SKUS for a resource. */ -@Fluent -public final class SkuResourceInner { - /* - * Gets or sets the Sku Capacity. - */ - @JsonProperty(value = "capacity") - private SkuCapacity capacity; - - /* - * The resource type name. - */ - @JsonProperty(value = "resourceType", access = JsonProperty.Access.WRITE_ONLY) - private String resourceType; - - /* - * Gets or sets the Sku. - */ - @JsonProperty(value = "sku") - private SkuSetting sku; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (capacity() != null) { - capacity().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} 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 a236638281281..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.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.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The result of update workspace quota. */ -@Immutable -public final class UpdateWorkspaceQuotasResultInner { - /* - * The list of workspace quota update result. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * 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()); - } - } -} 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 e1cee07fbefd2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.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.Immutable; -import com.azure.resourcemanager.machinelearning.models.UsageName; -import com.azure.resourcemanager.machinelearning.models.UsageUnit; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes AML Resource Usage. */ -@Immutable -public final class UsageInner { - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Region of the AML workspace in the id. - */ - @JsonProperty(value = "amlWorkspaceLocation", access = JsonProperty.Access.WRITE_ONLY) - private String amlWorkspaceLocation; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * An enum describing the unit of usage measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private UsageUnit unit; - - /* - * The current usage of the resource. - */ - @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) - private Long currentValue; - - /* - * The maximum permitted usage of the resource. - */ - @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) - private Long limit; - - /* - * The name of the type of usage. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private UsageName name; - - /** - * 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(); - } - } -} 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 fc5171f87b6d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Virtual Machine size operation response. */ -@Fluent -public final class VirtualMachineSizeListResultInner { - /* - * The list of virtual machine sizes supported by AmlCompute. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.java deleted file mode 100644 index 29a2eba2110c6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionInner.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.resourcemanager.machinelearning.models.ValueFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace connection. */ -@Fluent -public final class WorkspaceConnectionInner extends ProxyResource { - /* - * Properties of workspace connection. - */ - @JsonProperty(value = "properties") - private WorkspaceConnectionProps innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * Get the innerProperties property: Properties of workspace connection. - * - * @return the innerProperties value. - */ - private WorkspaceConnectionProps innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.innerProperties() == null ? null : this.innerProperties().category(); - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withCategory(String category) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withCategory(category); - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.innerProperties() == null ? null : this.innerProperties().target(); - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withTarget(String target) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withTarget(target); - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.innerProperties() == null ? null : this.innerProperties().authType(); - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withAuthType(String authType) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withAuthType(authType); - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.innerProperties() == null ? null : this.innerProperties().value(); - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValue(String value) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withValue(value); - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.innerProperties() == null ? null : this.innerProperties().valueFormat(); - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionInner object itself. - */ - public WorkspaceConnectionInner withValueFormat(ValueFormat valueFormat) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceConnectionProps(); - } - this.innerProperties().withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.java deleted file mode 100644 index 15f018b7d07cf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionProps.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace Connection specific properties. */ -@Fluent -public final class WorkspaceConnectionProps { - /* - * Category of the workspace connection. - */ - @JsonProperty(value = "category") - private String category; - - /* - * Target of the workspace connection. - */ - @JsonProperty(value = "target") - private String target; - - /* - * Authorization type of the workspace connection. - */ - @JsonProperty(value = "authType") - private String authType; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "valueFormat") - private ValueFormat valueFormat; - - /** - * Get the category property: Category of the workspace connection. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Category of the workspace connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the target property: Target of the workspace connection. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: Target of the workspace connection. - * - * @param target the target value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - public String authType() { - return this.authType; - } - - /** - * Set the authType property: Authorization type of the workspace connection. - * - * @param authType the authType value to set. - * @return the WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withAuthType(String authType) { - this.authType = authType; - 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 WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps 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 WorkspaceConnectionProps object itself. - */ - public WorkspaceConnectionProps withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 dccf0f29f1b64..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (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.resourcemanager.machinelearning.models.EncryptionProperty; -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.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -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. - */ - @JsonProperty(value = "properties") - private WorkspacePropertiesInner innerProperties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 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 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 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(); - } - - /** - * 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(); - } - } -} 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 afc399e84a5b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.java +++ /dev/null @@ -1,593 +0,0 @@ -// Copyright (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.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.ProvisioningState; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The properties of a machine learning workspace. */ -@Fluent -public final class WorkspacePropertiesInner { - /* - * The immutable id associated with this workspace. - */ - @JsonProperty(value = "workspaceId", access = JsonProperty.Access.WRITE_ONLY) - private String workspaceId; - - /* - * The description of this workspace. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The friendly name for this workspace. This name in mutable - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /* - * ARM id of the key vault associated with this workspace. This cannot be - * changed once the workspace has been created - */ - @JsonProperty(value = "keyVault") - private String keyVault; - - /* - * ARM id of the application insights associated with this workspace. - */ - @JsonProperty(value = "applicationInsights") - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. - */ - @JsonProperty(value = "containerRegistry") - private String containerRegistry; - - /* - * ARM id of the storage account associated with this workspace. This - * cannot be changed once the workspace has been created - */ - @JsonProperty(value = "storageAccount") - private String storageAccount; - - /* - * Url for the discovery service to identify regional endpoints for machine - * learning experimentation services - */ - @JsonProperty(value = "discoveryUrl") - private String discoveryUrl; - - /* - * The current deployment state of workspace resource. The - * provisioningState is to indicate states for resource provisioning. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The encryption settings of Azure ML workspace. - */ - @JsonProperty(value = "encryption") - private EncryptionProperty encryption; - - /* - * The flag to signal HBI data in the workspace and reduce diagnostic data - * collected by the service - */ - @JsonProperty(value = "hbiWorkspace") - private Boolean hbiWorkspace; - - /* - * The name of the managed resource group created by workspace RP in - * customer subscription if the workspace is CMK workspace - */ - @JsonProperty(value = "serviceProvisionedResourceGroup", access = JsonProperty.Access.WRITE_ONLY) - private String serviceProvisionedResourceGroup; - - /* - * Count of private connections in the workspace - */ - @JsonProperty(value = "privateLinkCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer privateLinkCount; - - /* - * The compute name for image build - */ - @JsonProperty(value = "imageBuildCompute") - private String imageBuildCompute; - - /* - * The flag to indicate whether to allow public access when behind VNet. - */ - @JsonProperty(value = "allowPublicAccessWhenBehindVnet") - private Boolean allowPublicAccessWhenBehindVnet; - - /* - * Whether requests from Public Network are allowed. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * The list of private endpoint connections in the workspace. - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /* - * The list of shared private link resources in this workspace. - */ - @JsonProperty(value = "sharedPrivateLinkResources") - private List sharedPrivateLinkResources; - - /* - * The notebook info of Azure ML workspace. - */ - @JsonProperty(value = "notebookInfo", access = JsonProperty.Access.WRITE_ONLY) - private NotebookResourceInfoInner notebookInfo; - - /* - * The service managed resource settings. - */ - @JsonProperty(value = "serviceManagedResourcesSettings") - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace - * identity. - */ - @JsonProperty(value = "primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; - - /* - * The tenant id associated with this workspace. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private String tenantId; - - /* - * If the storage associated with the workspace has hierarchical - * namespace(HNS) enabled. - */ - @JsonProperty(value = "storageHnsEnabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean storageHnsEnabled; - - /* - * The URI associated with this workspace that machine learning flow must - * point at to set up tracking. - */ - @JsonProperty(value = "mlFlowTrackingUri", access = JsonProperty.Access.WRITE_ONLY) - private String mlFlowTrackingUri; - - /** - * 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 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; - } - - /** - * 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 (sharedPrivateLinkResources() != null) { - sharedPrivateLinkResources().forEach(e -> e.validate()); - } - if (notebookInfo() != null) { - notebookInfo().validate(); - } - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java deleted file mode 100644 index 21988b519d02d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The parameters for updating the properties of a machine learning workspace. */ -@Fluent -public final class WorkspacePropertiesUpdateParameters { - /* - * The description of this workspace. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The friendly name for this workspace. - */ - @JsonProperty(value = "friendlyName") - private String friendlyName; - - /* - * The compute name for image build - */ - @JsonProperty(value = "imageBuildCompute") - private String imageBuildCompute; - - /* - * The service managed resource settings. - */ - @JsonProperty(value = "serviceManagedResourcesSettings") - private ServiceManagedResourcesSettings serviceManagedResourcesSettings; - - /* - * The user assigned identity resource id that represents the workspace - * identity. - */ - @JsonProperty(value = "primaryUserAssignedIdentity") - private String primaryUserAssignedIdentity; - - /* - * Whether requests from Public Network are allowed. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccess publicNetworkAccess; - - /* - * ARM id of the application insights associated with this workspace. - */ - @JsonProperty(value = "applicationInsights") - private String applicationInsights; - - /* - * ARM id of the container registry associated with this workspace. - */ - @JsonProperty(value = "containerRegistry") - private String containerRegistry; - - /** - * 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters object itself. - */ - public WorkspacePropertiesUpdateParameters withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceManagedResourcesSettings() != null) { - serviceManagedResourcesSettings().validate(); - } - } -} 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 3e822d30cd968..0000000000000 --- 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 f5bef46229750..0000000000000 --- 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/AmlOperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java deleted file mode 100644 index 803be140a597c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.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.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; - -public final class AmlOperationImpl implements AmlOperation { - private AmlOperationInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - AmlOperationImpl( - AmlOperationInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public AmlOperationDisplay display() { - return this.innerModel().display(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public AmlOperationInner 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/AmlUserFeatureImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.java deleted file mode 100644 index 3430c2ef2701b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlUserFeatureImpl.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.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 f0af624f53aeb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.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.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() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - AzureMachineLearningWorkspacesImpl client = - new AzureMachineLearningWorkspacesImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); - 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 e40efd2bb575e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ /dev/null @@ -1,640 +0,0 @@ -// Copyright (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.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.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.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -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.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 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 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 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 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 = "2022-02-01-preview"; - 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.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.jobs = new JobsClientImpl(this); - this.modelContainers = new ModelContainersClientImpl(this); - this.modelVersions = new ModelVersionsClientImpl(this); - this.onlineEndpoints = new OnlineEndpointsClientImpl(this); - this.onlineDeployments = new OnlineDeploymentsClientImpl(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(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/BatchDeploymentDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.java deleted file mode 100644 index fe5494f08928d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentDataImpl.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.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.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -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 BatchDeploymentDataImpl - implements BatchDeploymentData, BatchDeploymentData.Definition, BatchDeploymentData.Update { - private BatchDeploymentDataInner 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 BatchDeploymentDetails properties() { - return this.innerModel().properties(); - } - - 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 BatchDeploymentDataInner 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 PartialBatchDeploymentPartialTrackedResource updateBody; - - public BatchDeploymentDataImpl withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public BatchDeploymentData create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); - return this; - } - - public BatchDeploymentData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - BatchDeploymentDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchDeploymentDataInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public BatchDeploymentDataImpl update() { - this.updateBody = new PartialBatchDeploymentPartialTrackedResource(); - return this; - } - - public BatchDeploymentData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public BatchDeploymentData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - BatchDeploymentDataImpl( - BatchDeploymentDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); - } - - public BatchDeploymentData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public BatchDeploymentData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public BatchDeploymentDataImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchDeploymentDataImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchDeploymentDataImpl withProperties(BatchDeploymentDetails properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchDeploymentDataImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchDeploymentDataImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchDeploymentDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public BatchDeploymentDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchDeploymentDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - public BatchDeploymentDataImpl withProperties(PartialBatchDeployment properties) { - this.updateBody.withProperties(properties); - return this; - } - - public BatchDeploymentDataImpl 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/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java deleted file mode 100644 index 6986819a12fef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java +++ /dev/null @@ -1,1662 +0,0 @@ -// Copyright (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.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialTrackedResource; -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") - private 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") PartialBatchDeploymentPartialTrackedResource 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") BatchDeploymentDataInner 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 BatchDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * 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, - PartialBatchDeploymentPartialTrackedResource 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, - PartialBatchDeploymentPartialTrackedResource 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, BatchDeploymentDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.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, BatchDeploymentDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.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, BatchDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource body) { - return 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, BatchDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource body, - Context context) { - return 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, - PartialBatchDeploymentPartialTrackedResource 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, - PartialBatchDeploymentPartialTrackedResource 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 BatchDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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 BatchDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialTrackedResource 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, - BatchDeploymentDataInner 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, - BatchDeploymentDataInner 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, BatchDeploymentDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.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, BatchDeploymentDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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(), - BatchDeploymentDataInner.class, - BatchDeploymentDataInner.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, BatchDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner body) { - return 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, BatchDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner body, - Context context) { - return 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, - BatchDeploymentDataInner 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, - BatchDeploymentDataInner 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 BatchDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner 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 BatchDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentDataInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 0432be7ce8f1e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.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.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.BatchDeploymentDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -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 Utils.mapPage(inner, inner1 -> new BatchDeploymentDataImpl(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 Utils.mapPage(inner, inner1 -> new BatchDeploymentDataImpl(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 BatchDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - BatchDeploymentDataInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new BatchDeploymentDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 BatchDeploymentDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BatchDeploymentData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 BatchDeploymentDataImpl define(String name) { - return new BatchDeploymentDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointDataImpl.java deleted file mode 100644 index 518a953f8c0de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointDataImpl.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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -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 BatchEndpointDataImpl - implements BatchEndpointData, BatchEndpointData.Definition, BatchEndpointData.Update { - private BatchEndpointDataInner 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 BatchEndpointDetails properties() { - return this.innerModel().properties(); - } - - public Sku sku() { - return this.innerModel().sku(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BatchEndpointDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialBatchEndpointPartialTrackedResource updateBody; - - public BatchEndpointDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public BatchEndpointData create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public BatchEndpointData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - BatchEndpointDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchEndpointDataInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public BatchEndpointDataImpl update() { - this.updateBody = new PartialBatchEndpointPartialTrackedResource(); - return this; - } - - public BatchEndpointData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public BatchEndpointData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - BatchEndpointDataImpl( - BatchEndpointDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - } - - public BatchEndpointData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public BatchEndpointData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public EndpointAuthKeys listKeys() { - return serviceManager.batchEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager - .batchEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public BatchEndpointDataImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchEndpointDataImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchEndpointDataImpl withProperties(BatchEndpointDetails properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchEndpointDataImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchEndpointDataImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchEndpointDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public BatchEndpointDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchEndpointDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - public BatchEndpointDataImpl withProperties(PartialBatchEndpoint properties) { - this.updateBody.withProperties(properties); - return this; - } - - public BatchEndpointDataImpl 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/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java deleted file mode 100644 index 31905c31d7ab7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java +++ /dev/null @@ -1,1668 +0,0 @@ -// Copyright (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.BatchEndpointDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpointPartialTrackedResource; -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") - private 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") PartialBatchEndpointPartialTrackedResource 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") BatchEndpointDataInner 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 BatchEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getAsync(resourceGroupName, workspaceName, endpointName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * 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, - PartialBatchEndpointPartialTrackedResource 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, - PartialBatchEndpointPartialTrackedResource 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, BatchEndpointDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.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, BatchEndpointDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.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, BatchEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource body) { - return 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, BatchEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource body, - Context context) { - return 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, - PartialBatchEndpointPartialTrackedResource 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, - PartialBatchEndpointPartialTrackedResource 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 BatchEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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 BatchEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialBatchEndpointPartialTrackedResource 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, BatchEndpointDataInner 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, - BatchEndpointDataInner 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, BatchEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.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, BatchEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointDataInner.class, - BatchEndpointDataInner.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, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner body) { - return 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, BatchEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner body, - Context context) { - return 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, BatchEndpointDataInner 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, - BatchEndpointDataInner 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 BatchEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointDataInner 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 BatchEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - BatchEndpointDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 listKeysAsync(resourceGroupName, workspaceName, endpointName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 fb052ad121b60..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsImpl.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.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.BatchEndpointDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -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 Utils.mapPage(inner, inner1 -> new BatchEndpointDataImpl(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 Utils.mapPage(inner, inner1 -> new BatchEndpointDataImpl(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 BatchEndpointData get(String resourceGroupName, String workspaceName, String endpointName) { - BatchEndpointDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new BatchEndpointDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 BatchEndpointDataImpl(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 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 BatchEndpointData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 BatchEndpointDataImpl define(String name) { - return new BatchEndpointDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.java deleted file mode 100644 index 0264bd5924f4d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerDataImpl.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.CodeContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerData; -import com.azure.resourcemanager.machinelearning.models.CodeContainerDetails; - -public final class CodeContainerDataImpl - implements CodeContainerData, CodeContainerData.Definition, CodeContainerData.Update { - private CodeContainerDataInner 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 CodeContainerDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeContainerDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public CodeContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public CodeContainerData create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainerData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeContainerDataInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public CodeContainerDataImpl update() { - return this; - } - - public CodeContainerData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainerData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerDataImpl( - CodeContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); - } - - public CodeContainerData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public CodeContainerData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public CodeContainerDataImpl withProperties(CodeContainerDetails 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 f52e7e3e1240a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright (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.CodeContainerDataInner; -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") - private 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") CodeContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 CodeContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, CodeContainerDataInner 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, CodeContainerDataInner 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, CodeContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 CodeContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 efa1413b9df65..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersImpl.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.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerData; -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 Utils.mapPage(inner, inner1 -> new CodeContainerDataImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeContainerDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public CodeContainerData get(String resourceGroupName, String workspaceName, String name) { - CodeContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new CodeContainerDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 CodeContainerDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeContainerData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 CodeContainerDataImpl define(String name) { - return new CodeContainerDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.java deleted file mode 100644 index ab51389d986e8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionDataImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionData; -import com.azure.resourcemanager.machinelearning.models.CodeVersionDetails; - -public final class CodeVersionDataImpl implements CodeVersionData, CodeVersionData.Definition, CodeVersionData.Update { - private CodeVersionDataInner 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 CodeVersionDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeVersionDataInner 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 CodeVersionDataImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public CodeVersionData create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeVersionData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeVersionDataInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public CodeVersionDataImpl update() { - return this; - } - - public CodeVersionData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeVersionData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionDataImpl( - CodeVersionDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public CodeVersionData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public CodeVersionData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public CodeVersionDataImpl withProperties(CodeVersionDetails 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 c63458b8eaf4d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java +++ /dev/null @@ -1,1011 +0,0 @@ -// Copyright (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.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionResourceArmPaginatedResult; -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") - private 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, - @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") CodeVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip), - 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; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip), - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, 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; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 CodeVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, CodeVersionDataInner 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, - CodeVersionDataInner 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, CodeVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 CodeVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 a3fb6e2470b43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsImpl.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.CodeVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersionData; -import com.azure.resourcemanager.machinelearning.models.CodeVersions; - -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 Utils.mapPage(inner, inner1 -> new CodeVersionDataImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeVersionDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public CodeVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - CodeVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new CodeVersionDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 CodeVersionDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeVersionData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 CodeVersionDataImpl define(String name) { - return new CodeVersionDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.java deleted file mode 100644 index 261dd297a33f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerDataImpl.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.ComponentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerData; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerDetails; - -public final class ComponentContainerDataImpl - implements ComponentContainerData, ComponentContainerData.Definition, ComponentContainerData.Update { - private ComponentContainerDataInner 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 ComponentContainerDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentContainerDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ComponentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ComponentContainerData create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainerData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentContainerDataInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ComponentContainerDataImpl update() { - return this; - } - - public ComponentContainerData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainerData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerDataImpl( - ComponentContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); - } - - public ComponentContainerData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ComponentContainerData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ComponentContainerDataImpl withProperties(ComponentContainerDetails 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 98f26e17277e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java +++ /dev/null @@ -1,921 +0,0 @@ -// Copyright (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.ComponentContainerDataInner; -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") - private 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") ComponentContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ComponentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, ComponentContainerDataInner 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, - ComponentContainerDataInner 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, ComponentContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ComponentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerDataInner 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. - * @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, - ComponentContainerDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 932afbcbf09f3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersImpl.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.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerData; -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 Utils.mapPage(inner, inner1 -> new ComponentContainerDataImpl(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 Utils.mapPage(inner, inner1 -> new ComponentContainerDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public ComponentContainerData get(String resourceGroupName, String workspaceName, String name) { - ComponentContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ComponentContainerDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 ComponentContainerDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentContainerData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 ComponentContainerDataImpl define(String name) { - return new ComponentContainerDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.java deleted file mode 100644 index b945042188db0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionDataImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; - -public final class ComponentVersionDataImpl - implements ComponentVersionData, ComponentVersionData.Definition, ComponentVersionData.Update { - private ComponentVersionDataInner 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 ComponentVersionDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentVersionDataInner 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 ComponentVersionDataImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ComponentVersionData create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentVersionData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentVersionDataInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ComponentVersionDataImpl update() { - return this; - } - - public ComponentVersionData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentVersionData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionDataImpl( - ComponentVersionDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public ComponentVersionData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ComponentVersionData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public ComponentVersionDataImpl withProperties(ComponentVersionDetails 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 e0d37d18b8f1f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.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.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.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -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 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") - private 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") ComponentVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ComponentVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, ComponentVersionDataInner 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, - ComponentVersionDataInner 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, ComponentVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ComponentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionDataInner 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. - * @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, - ComponentVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 b72d5d00a9567..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.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.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.ComponentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersions; -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 Utils.mapPage(inner, inner1 -> new ComponentVersionDataImpl(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 Utils.mapPage(inner, inner1 -> new ComponentVersionDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public ComponentVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - ComponentVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ComponentVersionDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 ComponentVersionDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentVersionData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 ComponentVersionDataImpl define(String name) { - return new ComponentVersionDataImpl(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 4f60b2c8c375d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.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.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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.computeName = Utils.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 ComputeSecrets listKeys() { - return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.computes().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - 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 217d0a038ed72..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.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.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; - -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 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 7133570caee08..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java +++ /dev/null @@ -1,2849 +0,0 @@ -// Copyright (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") - private 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 getAsync(resourceGroupName, workspaceName, computeName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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 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 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 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 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 listKeysAsync(resourceGroupName, workspaceName, computeName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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 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 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 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 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 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 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 ade86e3600ec7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesImpl.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.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.ComputeSecrets; -import com.azure.resourcemanager.machinelearning.models.Computes; -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 Utils.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 Utils.mapPage(inner, inner1 -> new ComputeResourceImpl(inner1, this.manager())); - } - - 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 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 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 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 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 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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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/DataContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerDataImpl.java deleted file mode 100644 index 96583e6a09c9e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerDataImpl.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.DataContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerData; -import com.azure.resourcemanager.machinelearning.models.DataContainerDetails; - -public final class DataContainerDataImpl - implements DataContainerData, DataContainerData.Definition, DataContainerData.Update { - private DataContainerDataInner 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 DataContainerDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataContainerDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public DataContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public DataContainerData create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainerData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataContainerDataInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DataContainerDataImpl update() { - return this; - } - - public DataContainerData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainerData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerDataImpl( - DataContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); - } - - public DataContainerData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public DataContainerData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public DataContainerDataImpl withProperties(DataContainerDetails 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 b2bdd57b5e675..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java +++ /dev/null @@ -1,913 +0,0 @@ -// Copyright (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.DataContainerDataInner; -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") - private 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") DataContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DataContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, DataContainerDataInner 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, DataContainerDataInner 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, DataContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DataContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerDataInner 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. - * @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, DataContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 a06835365fe66..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersImpl.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.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerData; -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 Utils.mapPage(inner, inner1 -> new DataContainerDataImpl(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 Utils.mapPage(inner, inner1 -> new DataContainerDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public DataContainerData get(String resourceGroupName, String workspaceName, String name) { - DataContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DataContainerDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 DataContainerDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataContainerData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 DataContainerDataImpl define(String name) { - return new DataContainerDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseDataImpl.java deleted file mode 100644 index eb44fdf76cedd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseDataImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseData; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseDetails; - -public final class DataVersionBaseDataImpl - implements DataVersionBaseData, DataVersionBaseData.Definition, DataVersionBaseData.Update { - private DataVersionBaseDataInner 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 DataVersionBaseDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataVersionBaseDataInner 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 DataVersionBaseDataImpl withExistingData(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public DataVersionBaseData create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataVersionBaseData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataVersionBaseDataInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public DataVersionBaseDataImpl update() { - return this; - } - - public DataVersionBaseData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataVersionBaseData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseDataImpl( - DataVersionBaseDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public DataVersionBaseData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public DataVersionBaseData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public DataVersionBaseDataImpl withProperties(DataVersionBaseDetails 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 020934963bfa3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java +++ /dev/null @@ -1,1066 +0,0 @@ -// Copyright (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.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -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 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") - private 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") DataVersionBaseDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DataVersionBaseDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, DataVersionBaseDataInner 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, - DataVersionBaseDataInner 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, DataVersionBaseDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DataVersionBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseDataInner 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. - * @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, - DataVersionBaseDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 2b82c582e9d66..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.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.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.DataVersionBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseData; -import com.azure.resourcemanager.machinelearning.models.DataVersions; -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 Utils.mapPage(inner, inner1 -> new DataVersionBaseDataImpl(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 Utils.mapPage(inner, inner1 -> new DataVersionBaseDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public DataVersionBaseData get(String resourceGroupName, String workspaceName, String name, String version) { - DataVersionBaseDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new DataVersionBaseDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 DataVersionBaseDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataVersionBaseData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 DataVersionBaseDataImpl define(String name) { - return new DataVersionBaseDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreDataImpl.java deleted file mode 100644 index 21f1d2667452a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreDataImpl.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.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.DatastoreDataInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreData; -import com.azure.resourcemanager.machinelearning.models.DatastoreDetails; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; - -public final class DatastoreDataImpl implements DatastoreData, DatastoreData.Definition, DatastoreData.Update { - private DatastoreDataInner 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 DatastoreDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DatastoreDataInner 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 DatastoreDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public DatastoreData create() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, Context.NONE) - .getValue(); - return this; - } - - public DatastoreData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, context) - .getValue(); - return this; - } - - DatastoreDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DatastoreDataInner(); - this.serviceManager = serviceManager; - this.name = name; - this.createSkipValidation = null; - } - - public DatastoreDataImpl update() { - this.updateSkipValidation = null; - return this; - } - - public DatastoreData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, Context.NONE) - .getValue(); - return this; - } - - public DatastoreData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, context) - .getValue(); - return this; - } - - DatastoreDataImpl( - DatastoreDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "datastores"); - } - - public DatastoreData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public DatastoreData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public DatastoreSecrets listSecrets() { - return serviceManager.datastores().listSecrets(resourceGroupName, workspaceName, name); - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - } - - public DatastoreDataImpl withProperties(DatastoreDetails properties) { - this.innerModel().withProperties(properties); - return this; - } - - public DatastoreDataImpl 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 e2678170c2311..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.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.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; - -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 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 8191aaa912b5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java +++ /dev/null @@ -1,1252 +0,0 @@ -// Copyright (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.core.util.serializer.CollectionFormat; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; -import java.util.List; -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") - private 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") DatastoreDataInner 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 = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); - 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 = - JacksonAdapter.createDefaultSerializerAdapter().serializeList(names, CollectionFormat.CSV); - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DatastoreDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, DatastoreDataInner 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, - DatastoreDataInner 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. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body, Boolean skipValidation) { - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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, DatastoreDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 DatastoreDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreDataInner body) { - final Boolean skipValidation = null; - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, skipValidation).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. - * @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, - DatastoreDataInner body, - Boolean skipValidation, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 listSecretsAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 376f7c9a45ff0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresImpl.java +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.DatastoreDataInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreData; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.Datastores; -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 Utils.mapPage(inner, inner1 -> new DatastoreDataImpl(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 Utils.mapPage(inner, inner1 -> new DatastoreDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public DatastoreData get(String resourceGroupName, String workspaceName, String name) { - DatastoreDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 DatastoreDataImpl(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 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 DatastoreData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 DatastoreDataImpl define(String name) { - return new DatastoreDataImpl(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 e3f96c2eabf72..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.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.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 7b4dfe310adac..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DiagnoseResponseResultImpl.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.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 5cd99472c86a0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthKeysImpl.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.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 2bb22886310c2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointAuthTokenImpl.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.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 Long expiryTimeUtc() { - return this.innerModel().expiryTimeUtc(); - } - - public Long refreshAfterTimeUtc() { - return this.innerModel().refreshAfterTimeUtc(); - } - - public String tokenType() { - return this.innerModel().tokenType(); - } - - 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 72da8064892e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EndpointPropertiesBaseImpl.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.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 EndpointAuthMode authMode() { - return this.innerModel().authMode(); - } - - public String description() { - return this.innerModel().description(); - } - - public EndpointAuthKeys keys() { - EndpointAuthKeysInner inner = this.innerModel().keys(); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 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/EnvironmentContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerDataImpl.java deleted file mode 100644 index b634d9599dafc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerDataImpl.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.EnvironmentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerDetails; - -public final class EnvironmentContainerDataImpl - implements EnvironmentContainerData, EnvironmentContainerData.Definition, EnvironmentContainerData.Update { - private EnvironmentContainerDataInner 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 EnvironmentContainerDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentContainerDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public EnvironmentContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public EnvironmentContainerData create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainerData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentContainerDataInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public EnvironmentContainerDataImpl update() { - return this; - } - - public EnvironmentContainerData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainerData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerDataImpl( - EnvironmentContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); - } - - public EnvironmentContainerData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainerData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public EnvironmentContainerDataImpl withProperties(EnvironmentContainerDetails 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 c2feb7dd5e19d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java +++ /dev/null @@ -1,923 +0,0 @@ -// Copyright (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.EnvironmentContainerDataInner; -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") - private 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") EnvironmentContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 EnvironmentContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, EnvironmentContainerDataInner 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, - EnvironmentContainerDataInner 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, EnvironmentContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 EnvironmentContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - EnvironmentContainerDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 f562d3cb0a38c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.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.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerData; -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 Utils.mapPage(inner, inner1 -> new EnvironmentContainerDataImpl(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 Utils.mapPage(inner, inner1 -> new EnvironmentContainerDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public EnvironmentContainerData get(String resourceGroupName, String workspaceName, String name) { - EnvironmentContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new EnvironmentContainerDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 EnvironmentContainerDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentContainerData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 EnvironmentContainerDataImpl define(String name) { - return new EnvironmentContainerDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.java deleted file mode 100644 index 1636870e45e37..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionDataImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; - -public final class EnvironmentVersionDataImpl - implements EnvironmentVersionData, EnvironmentVersionData.Definition, EnvironmentVersionData.Update { - private EnvironmentVersionDataInner 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 EnvironmentVersionDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentVersionDataInner 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 EnvironmentVersionDataImpl withExistingEnvironment( - String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public EnvironmentVersionData create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersionData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentVersionDataInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public EnvironmentVersionDataImpl update() { - return this; - } - - public EnvironmentVersionData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersionData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionDataImpl( - EnvironmentVersionDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public EnvironmentVersionData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersionData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public EnvironmentVersionDataImpl withProperties(EnvironmentVersionDetails 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 224d59b216f26..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java +++ /dev/null @@ -1,1045 +0,0 @@ -// Copyright (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.EnvironmentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -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 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") - private 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") EnvironmentVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 EnvironmentVersionDataInner get( - String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, EnvironmentVersionDataInner 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, - EnvironmentVersionDataInner 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, EnvironmentVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 EnvironmentVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, version, body).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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, - EnvironmentVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 a7a4c36384cb5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsImpl.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.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.EnvironmentVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionData; -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 Utils.mapPage(inner, inner1 -> new EnvironmentVersionDataImpl(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 Utils.mapPage(inner, inner1 -> new EnvironmentVersionDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public EnvironmentVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - EnvironmentVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new EnvironmentVersionDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 EnvironmentVersionDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentVersionData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 EnvironmentVersionDataImpl define(String name) { - return new EnvironmentVersionDataImpl(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 7f27891cd16a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.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.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/JobBaseDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseDataImpl.java deleted file mode 100644 index 640159cd03446..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseDataImpl.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.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.JobBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseData; -import com.azure.resourcemanager.machinelearning.models.JobBaseDetails; - -public final class JobBaseDataImpl implements JobBaseData, JobBaseData.Definition, JobBaseData.Update { - private JobBaseDataInner 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 JobBaseDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JobBaseDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String id; - - public JobBaseDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public JobBaseData create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBaseData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new JobBaseDataInner(); - this.serviceManager = serviceManager; - this.id = name; - } - - public JobBaseDataImpl update() { - return this; - } - - public JobBaseData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBaseData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseDataImpl( - JobBaseDataInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.id = Utils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public JobBaseData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE) - .getValue(); - return this; - } - - public JobBaseData 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 Response cancelWithResponse(Context context) { - return serviceManager.jobs().cancelWithResponse(resourceGroupName, workspaceName, id, context); - } - - public JobBaseDataImpl withProperties(JobBaseDetails 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 f2c11073c9e45..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java +++ /dev/null @@ -1,1270 +0,0 @@ -// Copyright (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.JobBaseDataInner; -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") - private 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("scheduled") Boolean scheduled, - @QueryParam("scheduleId") String scheduleId, - @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") JobBaseDataInner 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}) - @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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - scheduled, - scheduleId, - 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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - scheduled, - scheduleId, - 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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId), - 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 Boolean scheduled = null; - final String scheduleId = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId), - 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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId, 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 Boolean scheduled = null; - final String scheduleId = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId)); - } - - /** - * 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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId, 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 JobBaseDataInner get(String resourceGroupName, String workspaceName, String id) { - return getAsync(resourceGroupName, workspaceName, id).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * Creates and executes a 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, JobBaseDataInner 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. - * - * @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, JobBaseDataInner 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. - * - * @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, JobBaseDataInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates and executes a 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 JobBaseDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String id, JobBaseDataInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, id, body).block(); - } - - /** - * Creates and executes a 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, JobBaseDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); - } - - /** - * Cancels a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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. - * - * @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. - * - * @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 cancelWithResponseAsync(resourceGroupName, workspaceName, id).flatMap(ignored -> Mono.empty()); - } - - /** - * Cancels a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response cancelWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return cancelWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 bbd2a142394e7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.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.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.JobBaseDataInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseData; -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 Utils.mapPage(inner, inner1 -> new JobBaseDataImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Boolean scheduled, - String scheduleId, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, workspaceName, skip, jobType, tag, listViewType, scheduled, scheduleId, context); - return Utils.mapPage(inner, inner1 -> new JobBaseDataImpl(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 JobBaseData get(String resourceGroupName, String workspaceName, String id) { - JobBaseDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); - if (inner != null) { - return new JobBaseDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 JobBaseDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void cancel(String resourceGroupName, String workspaceName, String id) { - this.serviceClient().cancel(resourceGroupName, workspaceName, id); - } - - public Response cancelWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return this.serviceClient().cancelWithResponse(resourceGroupName, workspaceName, id, context); - } - - public JobBaseData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 JobBaseDataImpl define(String name) { - return new JobBaseDataImpl(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 66fa88be97b17..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.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.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 5b7e3b40f651a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListStorageAccountKeysResultImpl.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.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 02beede5a627c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListWorkspaceKeysResultImpl.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.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/ModelContainerDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerDataImpl.java deleted file mode 100644 index 48ebb00f4f0d3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerDataImpl.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.ModelContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerData; -import com.azure.resourcemanager.machinelearning.models.ModelContainerDetails; - -public final class ModelContainerDataImpl - implements ModelContainerData, ModelContainerData.Definition, ModelContainerData.Update { - private ModelContainerDataInner 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 ModelContainerDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelContainerDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ModelContainerDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ModelContainerData create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainerData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelContainerDataInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ModelContainerDataImpl update() { - return this; - } - - public ModelContainerData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainerData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerDataImpl( - ModelContainerDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); - } - - public ModelContainerData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ModelContainerData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ModelContainerDataImpl withProperties(ModelContainerDetails 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 66d7502187975..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java +++ /dev/null @@ -1,938 +0,0 @@ -// Copyright (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.ModelContainerDataInner; -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") - private 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") ModelContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ModelContainerDataInner get(String resourceGroupName, String workspaceName, String name) { - return getAsync(resourceGroupName, workspaceName, name).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, ModelContainerDataInner 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, ModelContainerDataInner 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, ModelContainerDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ModelContainerDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerDataInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 2a7ed48e4af3c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.ModelContainerDataInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerData; -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 Utils.mapPage(inner, inner1 -> new ModelContainerDataImpl(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 Utils.mapPage(inner, inner1 -> new ModelContainerDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public ModelContainerData get(String resourceGroupName, String workspaceName, String name) { - ModelContainerDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ModelContainerDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 ModelContainerDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelContainerData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 ModelContainerDataImpl define(String name) { - return new ModelContainerDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.java deleted file mode 100644 index 4fe87793e74e4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionDataImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ModelVersionData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; - -public final class ModelVersionDataImpl - implements ModelVersionData, ModelVersionData.Definition, ModelVersionData.Update { - private ModelVersionDataInner 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 ModelVersionDetails properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelVersionDataInner 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 ModelVersionDataImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ModelVersionData create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelVersionData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionDataImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelVersionDataInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ModelVersionDataImpl update() { - return this; - } - - public ModelVersionData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelVersionData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionDataImpl( - ModelVersionDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); - this.version = Utils.getValueFromIdByName(innerObject.id(), "versions"); - } - - public ModelVersionData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ModelVersionData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public ModelVersionDataImpl withProperties(ModelVersionDetails 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 c22a87b4e8455..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java +++ /dev/null @@ -1,1199 +0,0 @@ -// Copyright (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.ModelVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -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") - private 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") ModelVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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. - * @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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ModelVersionDataInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getAsync(resourceGroupName, workspaceName, name, version).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, ModelVersionDataInner 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, - ModelVersionDataInner 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, ModelVersionDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 ModelVersionDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionDataInner 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 along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionDataInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 5b030dde0a886..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsImpl.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.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.ModelVersionDataInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionData; -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 Utils.mapPage(inner, inner1 -> new ModelVersionDataImpl(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 Utils.mapPage(inner, inner1 -> new ModelVersionDataImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public ModelVersionData get(String resourceGroupName, String workspaceName, String name, String version) { - ModelVersionDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ModelVersionDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 ModelVersionDataImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelVersionData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 ModelVersionDataImpl define(String name) { - return new ModelVersionDataImpl(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 56f19f2680b1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.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.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 79a6782c20d9b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookResourceInfoImpl.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.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/OnlineDeploymentDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentDataImpl.java deleted file mode 100644 index 0327c04149902..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentDataImpl.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (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.OnlineDeploymentDataInner; -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.OnlineDeploymentData; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentDetails; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineDeploymentPartialTrackedResource; -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 OnlineDeploymentDataImpl - implements OnlineDeploymentData, OnlineDeploymentData.Definition, OnlineDeploymentData.Update { - private OnlineDeploymentDataInner 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 OnlineDeploymentDetails properties() { - return this.innerModel().properties(); - } - - 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 OnlineDeploymentDataInner 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 PartialOnlineDeploymentPartialTrackedResource updateBody; - - public OnlineDeploymentDataImpl withExistingOnlineEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public OnlineDeploymentData create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); - return this; - } - - public OnlineDeploymentData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - OnlineDeploymentDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineDeploymentDataInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public OnlineDeploymentDataImpl update() { - this.updateBody = new PartialOnlineDeploymentPartialTrackedResource(); - return this; - } - - public OnlineDeploymentData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public OnlineDeploymentData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - OnlineDeploymentDataImpl( - OnlineDeploymentDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - this.deploymentName = Utils.getValueFromIdByName(innerObject.id(), "deployments"); - } - - public OnlineDeploymentData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public OnlineDeploymentData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public DeploymentLogs getLogs(DeploymentLogsRequest body) { - return serviceManager - .onlineDeployments() - .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); - } - - public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { - return serviceManager - .onlineDeployments() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - } - - public OnlineDeploymentDataImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineDeploymentDataImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineDeploymentDataImpl withProperties(OnlineDeploymentDetails properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineDeploymentDataImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineDeploymentDataImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineDeploymentDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public OnlineDeploymentDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineDeploymentDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - public OnlineDeploymentDataImpl withProperties(PartialOnlineDeployment properties) { - this.updateBody.withProperties(properties); - return this; - } - - public OnlineDeploymentDataImpl 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 5f49d40201d0c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java +++ /dev/null @@ -1,2281 +0,0 @@ -// Copyright (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.OnlineDeploymentDataInner; -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.PartialOnlineDeploymentPartialTrackedResource; -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") - private 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") PartialOnlineDeploymentPartialTrackedResource 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") OnlineDeploymentDataInner 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 OnlineDeploymentDataInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getAsync(resourceGroupName, workspaceName, endpointName, deploymentName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, - PartialOnlineDeploymentPartialTrackedResource 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, - PartialOnlineDeploymentPartialTrackedResource 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, OnlineDeploymentDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.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, OnlineDeploymentDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.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, OnlineDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body) { - return 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, OnlineDeploymentDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource body, - Context context) { - return 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, - PartialOnlineDeploymentPartialTrackedResource 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, - PartialOnlineDeploymentPartialTrackedResource 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 OnlineDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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 OnlineDeploymentDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialOnlineDeploymentPartialTrackedResource 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, - OnlineDeploymentDataInner 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, - OnlineDeploymentDataInner 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, OnlineDeploymentDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.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, OnlineDeploymentDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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(), - OnlineDeploymentDataInner.class, - OnlineDeploymentDataInner.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, OnlineDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner body) { - return 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, OnlineDeploymentDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner body, - Context context) { - return 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, - OnlineDeploymentDataInner 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, - OnlineDeploymentDataInner 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 OnlineDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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 OnlineDeploymentDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 getLogsAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 85265edfcdeb2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.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.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.OnlineDeploymentDataInner; -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.OnlineDeploymentData; -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 Utils.mapPage(inner, inner1 -> new OnlineDeploymentDataImpl(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 Utils.mapPage(inner, inner1 -> new OnlineDeploymentDataImpl(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 OnlineDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - OnlineDeploymentDataInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new OnlineDeploymentDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 OnlineDeploymentDataImpl(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 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 PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - PagedIterable inner = - this.serviceClient().listSkus(resourceGroupName, workspaceName, endpointName, deploymentName); - return Utils.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 Utils.mapPage(inner, inner1 -> new SkuResourceImpl(inner1, this.manager())); - } - - public OnlineDeploymentData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.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 OnlineDeploymentDataImpl define(String name) { - return new OnlineDeploymentDataImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointDataImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointDataImpl.java deleted file mode 100644 index d224776249ddb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointDataImpl.java +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.OnlineEndpointDataInner; -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.OnlineEndpointData; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpointPartialTrackedResource; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -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 OnlineEndpointDataImpl - implements OnlineEndpointData, OnlineEndpointData.Definition, OnlineEndpointData.Update { - private OnlineEndpointDataInner 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 OnlineEndpointDetails properties() { - return this.innerModel().properties(); - } - - 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 OnlineEndpointDataInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialOnlineEndpointPartialTrackedResource updateBody; - - public OnlineEndpointDataImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public OnlineEndpointData create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public OnlineEndpointData create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - OnlineEndpointDataImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineEndpointDataInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public OnlineEndpointDataImpl update() { - this.updateBody = new PartialOnlineEndpointPartialTrackedResource(); - return this; - } - - public OnlineEndpointData apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public OnlineEndpointData apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - OnlineEndpointDataImpl( - OnlineEndpointDataInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - } - - public OnlineEndpointData refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public OnlineEndpointData refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public EndpointAuthKeys listKeys() { - return serviceManager.onlineEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - 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 EndpointAuthToken getToken() { - return serviceManager.onlineEndpoints().getToken(resourceGroupName, workspaceName, endpointName); - } - - public Response getTokenWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public OnlineEndpointDataImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineEndpointDataImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineEndpointDataImpl withProperties(OnlineEndpointDetails properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineEndpointDataImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineEndpointDataImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineEndpointDataImpl withKind(String kind) { - if (isInCreateMode()) { - this.innerModel().withKind(kind); - return this; - } else { - this.updateBody.withKind(kind); - return this; - } - } - - public OnlineEndpointDataImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineEndpointDataImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - public OnlineEndpointDataImpl withProperties(PartialOnlineEndpoint properties) { - this.updateBody.withProperties(properties); - return this; - } - - public OnlineEndpointDataImpl 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/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java deleted file mode 100644 index 7f3222df5d62a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java +++ /dev/null @@ -1,2282 +0,0 @@ -// Copyright (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.OnlineEndpointDataInner; -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.PartialOnlineEndpointPartialTrackedResource; -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") - private 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") PartialOnlineEndpointPartialTrackedResource 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") OnlineEndpointDataInner 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 OnlineEndpointDataInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getAsync(resourceGroupName, workspaceName, endpointName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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, - PartialOnlineEndpointPartialTrackedResource 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, - PartialOnlineEndpointPartialTrackedResource 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, OnlineEndpointDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.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, OnlineEndpointDataInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.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, OnlineEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource body) { - return 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, OnlineEndpointDataInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource body, - Context context) { - return 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, - PartialOnlineEndpointPartialTrackedResource 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, - PartialOnlineEndpointPartialTrackedResource 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 OnlineEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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 OnlineEndpointDataInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialOnlineEndpointPartialTrackedResource 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, OnlineEndpointDataInner 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, - OnlineEndpointDataInner 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, OnlineEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.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, OnlineEndpointDataInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointDataInner.class, - OnlineEndpointDataInner.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, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner body) { - return 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, OnlineEndpointDataInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner body, - Context context) { - return 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, OnlineEndpointDataInner 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, - OnlineEndpointDataInner 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 OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointDataInner 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 OnlineEndpointDataInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointDataInner 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 listKeysAsync(resourceGroupName, workspaceName, endpointName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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(); - } - - /** - * 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 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 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 AAD 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 AAD 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 AAD 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 AAD 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 getTokenAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Retrieve a valid AAD 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(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 d5c61a521bcf0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsImpl.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.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.OnlineEndpointDataInner; -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.OnlineEndpointData; -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 Utils.mapPage(inner, inner1 -> new OnlineEndpointDataImpl(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 Utils.mapPage(inner, inner1 -> new OnlineEndpointDataImpl(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 OnlineEndpointData get(String resourceGroupName, String workspaceName, String endpointName) { - OnlineEndpointDataInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new OnlineEndpointDataImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 OnlineEndpointDataImpl(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 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 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 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 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 OnlineEndpointData getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 OnlineEndpointDataImpl define(String name) { - return new OnlineEndpointDataImpl(name, this.manager()); - } -} 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 a6e01f602a4ae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.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.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.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationListResult; -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") - private 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 an array of operations supported by the 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 an array of operations supported by the 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 an array of operations supported by the 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 an array of operations supported by the 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 an array of operations supported by the 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 an array of operations supported by the 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 9a500e365bd68..0000000000000 --- 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.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; -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 Utils.mapPage(inner, inner1 -> new AmlOperationImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new AmlOperationImpl(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/PrivateEndpointConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index edc0d80a01ead..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionImpl.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.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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.privateEndpointConnectionName = Utils.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 9aaae4a4002c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,833 +0,0 @@ -// Copyright (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") - private 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 getAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 createOrUpdateAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, properties).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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) { - deleteAsync(resourceGroupName, workspaceName, privateEndpointConnectionName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } -} 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 ee8376e82db2a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.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.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 Utils.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 Utils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); - } - - 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 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 void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 14109bebe8033..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourceListResultImpl.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.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 5c5d1ed0c21b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesClientImpl.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.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") - private 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 listAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } -} 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 3928c924b0e2e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.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.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 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; - } - } - - 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; - } - } - - 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 6a4f8df42d402..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java +++ /dev/null @@ -1,478 +0,0 @@ -// Copyright (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") - private 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 updateAsync(location, parameters).block(); - } - - /** - * 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(); - } - - /** - * 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 e17cadcd1b868..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasImpl.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.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.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.Quotas; -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 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 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 PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return Utils.mapPage(inner, inner1 -> new ResourceQuotaImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.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/ResourceQuotaImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.java deleted file mode 100644 index a16025c4b7b7f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ResourceQuotaImpl.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.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/SkuResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java deleted file mode 100644 index 122efdee34aef..0000000000000 --- 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 SkuCapacity capacity() { - return this.innerModel().capacity(); - } - - public String resourceType() { - return this.innerModel().resourceType(); - } - - public SkuSetting sku() { - return this.innerModel().sku(); - } - - 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 908490a7694de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UpdateWorkspaceQuotasResultImpl.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.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 393fe54fa9839..0000000000000 --- 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 f6c8c78e6a014..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,316 +0,0 @@ -// Copyright (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") - private 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 b70b59b57e69a..0000000000000 --- 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 Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return Utils.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/Utils.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/Utils.java deleted file mode 100644 index 7ca689e769aec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/Utils.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 Utils { - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/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 92771d638a0b9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizeListResultImpl.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.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 039a42f6cb42a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesClientImpl.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.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") - private 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 listAsync(location).block(); - } - - /** - * 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(); - } -} 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 c837e1437ad21..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.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.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 VirtualMachineSizeListResult list(String location) { - VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); - if (inner != null) { - return new VirtualMachineSizeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - 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; - } - } - - 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/WorkspaceConnectionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionImpl.java deleted file mode 100644 index 168d77946ab13..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnection; - -public final class WorkspaceConnectionImpl implements WorkspaceConnection, WorkspaceConnection.Definition { - private WorkspaceConnectionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - WorkspaceConnectionImpl( - WorkspaceConnectionInner 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 SystemData systemData() { - return this.innerModel().systemData(); - } - - public String category() { - return this.innerModel().category(); - } - - public String target() { - return this.innerModel().target(); - } - - public String authType() { - return this.innerModel().authType(); - } - - public String value() { - return this.innerModel().value(); - } - - public ValueFormat valueFormat() { - return this.innerModel().valueFormat(); - } - - public WorkspaceConnectionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String connectionName; - - public WorkspaceConnectionImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public WorkspaceConnection create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnection create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) - .getValue(); - return this; - } - - WorkspaceConnectionImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new WorkspaceConnectionInner(); - this.serviceManager = serviceManager; - this.connectionName = name; - } - - public WorkspaceConnection refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnection refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, context) - .getValue(); - return this; - } - - public WorkspaceConnectionImpl withCategory(String category) { - this.innerModel().withCategory(category); - return this; - } - - public WorkspaceConnectionImpl withTarget(String target) { - this.innerModel().withTarget(target); - return this; - } - - public WorkspaceConnectionImpl withAuthType(String authType) { - this.innerModel().withAuthType(authType); - return this; - } - - public WorkspaceConnectionImpl withValue(String value) { - this.innerModel().withValue(value); - return this; - } - - public WorkspaceConnectionImpl withValueFormat(ValueFormat valueFormat) { - this.innerModel().withValueFormat(valueFormat); - 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 3f1740d50c1e8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java +++ /dev/null @@ -1,825 +0,0 @@ -// Copyright (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.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PaginatedWorkspaceConnectionsList; -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") - private interface WorkspaceConnectionsService { - @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("api-version") String apiVersion, - @QueryParam("target") String target, - @QueryParam("category") String category, - @HeaderParam("Accept") String accept, - Context context); - - @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") WorkspaceConnectionInner 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); - } - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects 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, - this.client.getApiVersion(), - target, - category, - 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 connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects 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, - this.client.getApiVersion(), - target, - category, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects as 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)); - } - - /** - * List all connections under a AML 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 paginated list of Workspace connection objects as 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)); - } - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects as 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)); - } - - /** - * List all connections under a AML 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 paginated list of Workspace connection objects as 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)); - } - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects as 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)); - } - - /** - * Add a new workspace connection. - * - * @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 workspace connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner 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())); - } - - /** - * Add a new workspace connection. - * - * @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 workspace connection along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner 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); - } - - /** - * Add a new workspace connection. - * - * @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 workspace connection on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Add a new workspace connection. - * - * @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 workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner create( - String resourceGroupName, String workspaceName, String connectionName, WorkspaceConnectionInner parameters) { - return createAsync(resourceGroupName, workspaceName, connectionName, parameters).block(); - } - - /** - * Add a new workspace connection. - * - * @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 workspace connection along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); - } - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection 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())); - } - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection 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); - } - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection 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())); - } - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionInner get(String resourceGroupName, String workspaceName, String connectionName) { - return getAsync(resourceGroupName, workspaceName, connectionName).block(); - } - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection 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(); - } - - /** - * Delete a workspace connection. - * - * @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())); - } - - /** - * Delete a workspace connection. - * - * @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); - } - - /** - * Delete a workspace connection. - * - * @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()); - } - - /** - * Delete a workspace connection. - * - * @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) { - deleteAsync(resourceGroupName, workspaceName, connectionName).block(); - } - - /** - * Delete a workspace connection. - * - * @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(); - } -} 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 323c6294b7900..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.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.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnection; -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 PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(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 Utils.mapPage(inner, inner1 -> new WorkspaceConnectionImpl(inner1, this.manager())); - } - - public WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName) { - WorkspaceConnectionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, connectionName); - if (inner != null) { - return new WorkspaceConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 WorkspaceConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public WorkspaceConnection getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.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 WorkspaceConnectionImpl define(String name) { - return new WorkspaceConnectionImpl(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 4dd4cc101c36a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (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") - private 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 875e67abbaffb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesImpl.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.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 Utils.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 Utils.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 c9a699fc48b09..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,523 +0,0 @@ -// Copyright (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.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.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; -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.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.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 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 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 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 = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.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(DiagnoseWorkspaceParameters parameters) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters); - } - - 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 ListWorkspaceKeysResult listKeys() { - return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.workspaces().listKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - - public NotebookAccessTokenResult listNotebookAccessToken() { - return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); - } - - public Response listNotebookAccessTokenWithResponse(Context context) { - return serviceManager - .workspaces() - .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - } - - public NotebookResourceInfo prepareNotebook() { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); - } - - public NotebookResourceInfo prepareNotebook(Context context) { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); - } - - public ListStorageAccountKeysResult listStorageAccountKeys() { - return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); - } - - public Response listStorageAccountKeysWithResponse(Context context) { - return serviceManager - .workspaces() - .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); - } - - public Response listNotebookKeysWithResponse(Context context) { - return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - } - - 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 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 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; - } - } - - 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 047fce75bcc71..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.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.implementation; - -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.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.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -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 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 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/WorkspacesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java deleted file mode 100644 index 908deea49f7ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,3232 +0,0 @@ -// Copyright (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") - private 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, - @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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 getByResourceGroupAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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(); - } - - /** - * 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName); - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, 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) { - return beginDeleteAsync(resourceGroupName, workspaceName).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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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) { - return beginDeleteAsync(resourceGroupName, workspaceName).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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, 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) { - deleteAsync(resourceGroupName, workspaceName).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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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, Context context) { - deleteAsync(resourceGroupName, workspaceName, 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 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 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. - * @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. - * @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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - return 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 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. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 listKeysAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 listNotebookAccessTokenAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 listStorageAccountKeysAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 listNotebookKeysAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 listOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, workspaceName).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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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(); - } - - /** - * Get the next page of items. - * - * @param nextLink The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 53eca25a795fa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (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 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 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 void deleteByResourceGroup(String resourceGroupName, String workspaceName) { - this.serviceClient().delete(resourceGroupName, workspaceName); - } - - public void delete(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, context); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.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 Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - - 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 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 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 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 Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - public PagedIterable list(String skip, Context context) { - PagedIterable inner = this.serviceClient().list(skip, context); - return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); - } - - 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 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 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 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 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 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 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 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 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 Workspace getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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 = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String workspaceName = Utils.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, 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 d69c58716f983..0000000000000 --- 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/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java deleted file mode 100644 index 3f1a5c512d2c2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Account key datastore credentials configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("AccountKey") -@Fluent -public final class AccountKeyDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Storage account secrets. - */ - @JsonProperty(value = "secrets", required = true) - private AccountKeyDatastoreSecrets secrets; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model AccountKeyDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AccountKeyDatastoreCredentials.class); -} 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 f73479d7c1489..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Datastore account key secrets. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("AccountKey") -@Fluent -public final class AccountKeyDatastoreSecrets extends DatastoreSecretsInner { - /* - * Storage account key. - */ - @JsonProperty(value = "key") - private String key; - - /** - * 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(); - } -} 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 2629a6c4daa6f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class Aks extends Compute { - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private AksSchemaProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 3ab8405707506..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.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.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AKS") -@Fluent -public final class AksComputeSecrets extends ComputeSecretsInner { - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "userKubeConfig") - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "adminKubeConfig") - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - @JsonProperty(value = "imagePullSecretName") - private String imagePullSecretName; - - /** - * 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(); - } -} 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 662ce009c4eb1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of AksComputeSecrets. */ -@Fluent -public class AksComputeSecretsProperties { - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "userKubeConfig") - private String userKubeConfig; - - /* - * Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - */ - @JsonProperty(value = "adminKubeConfig") - private String adminKubeConfig; - - /* - * Image registry pull secret. - */ - @JsonProperty(value = "imagePullSecretName") - private String imagePullSecretName; - - /** - * 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() { - } -} 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 70eb655f389b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.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.fasterxml.jackson.annotation.JsonProperty; - -/** Advance configuration for AKS networking. */ -@Fluent -public final class AksNetworkingConfiguration { - /* - * Virtual network subnet resource ID the compute nodes belong to - */ - @JsonProperty(value = "subnetId") - private String subnetId; - - /* - * A CIDR notation IP range from which to assign service cluster IPs. It - * must not overlap with any Subnet IP ranges. - */ - @JsonProperty(value = "serviceCidr") - private String serviceCidr; - - /* - * An IP address assigned to the Kubernetes DNS service. It must be within - * the Kubernetes service address range specified in serviceCidr. - */ - @JsonProperty(value = "dnsServiceIP") - 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. - */ - @JsonProperty(value = "dockerBridgeCidr") - private String dockerBridgeCidr; - - /** - * 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() { - } -} 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 09fe5b728922b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The AksSchema model. */ -@Fluent -public class AksSchema { - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private AksSchemaProperties properties; - - /** - * 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(); - } - } -} 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 e16df20dee8c1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** AKS properties. */ -@Fluent -public final class AksSchemaProperties { - /* - * Cluster full qualified domain name - */ - @JsonProperty(value = "clusterFqdn") - private String clusterFqdn; - - /* - * System services - */ - @JsonProperty(value = "systemServices", access = JsonProperty.Access.WRITE_ONLY) - private List systemServices; - - /* - * Number of agents - */ - @JsonProperty(value = "agentCount") - private Integer agentCount; - - /* - * Agent virtual machine size - */ - @JsonProperty(value = "agentVmSize") - private String agentVmSize; - - /* - * Intended usage of the cluster - */ - @JsonProperty(value = "clusterPurpose") - private ClusterPurpose clusterPurpose; - - /* - * SSL configuration - */ - @JsonProperty(value = "sslConfiguration") - private SslConfiguration sslConfiguration; - - /* - * AKS networking configuration for vnet - */ - @JsonProperty(value = "aksNetworkingConfiguration") - private AksNetworkingConfiguration aksNetworkingConfiguration; - - /* - * Load Balancer Type - */ - @JsonProperty(value = "loadBalancerType") - private LoadBalancerType loadBalancerType; - - /* - * Load Balancer Subnet - */ - @JsonProperty(value = "loadBalancerSubnet") - private String loadBalancerSubnet; - - /** - * 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(); - } - } -} 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 7ba480b00fbd6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for AllocationState. */ -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 or finds a AllocationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationState. - */ - @JsonCreator - 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 94131bfbba3d4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An Azure Machine Learning compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("AmlCompute") -@Fluent -public final class AmlCompute extends Compute { - /* - * Properties of AmlCompute - */ - @JsonProperty(value = "properties") - private AmlComputeProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 e01ce2e594477..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.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.fasterxml.jackson.annotation.JsonProperty; - -/** Compute node information related to a AmlCompute. */ -@Immutable -public final class AmlComputeNodeInformation { - /* - * Node ID. ID of the compute node. - */ - @JsonProperty(value = "nodeId", access = JsonProperty.Access.WRITE_ONLY) - private String nodeId; - - /* - * Private IP address. Private IP address of the compute node. - */ - @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String privateIpAddress; - - /* - * Public IP address. Public IP address of the compute node. - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * Port. SSH port number of the node. - */ - @JsonProperty(value = "port", access = JsonProperty.Access.WRITE_ONLY) - private Integer port; - - /* - * State of the compute node. Values are idle, running, preparing, - * unusable, leaving and preempted. - */ - @JsonProperty(value = "nodeState", access = JsonProperty.Access.WRITE_ONLY) - private NodeState nodeState; - - /* - * Run ID. ID of the Experiment running on the node, if any else null. - */ - @JsonProperty(value = "runId", access = JsonProperty.Access.WRITE_ONLY) - private String runId; - - /** - * Get the nodeId property: Node ID. ID of the compute node. - * - * @return the nodeId value. - */ - public String nodeId() { - return this.nodeId; - } - - /** - * Get the privateIpAddress property: Private IP address. Private IP address of the compute node. - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Get the publicIpAddress property: Public IP address. Public IP address of the compute node. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the port property: Port. 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: Run ID. 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() { - } -} 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 7af05acd66971..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Result of AmlCompute Nodes. */ -@Immutable -public final class AmlComputeNodesInformation { - /* - * The collection of returned AmlCompute nodes details. - */ - @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) - private List nodes; - - /* - * The continuation token. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * 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()); - } - } -} 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 ae9c7b6f2014b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java +++ /dev/null @@ -1,465 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** AML Compute properties. */ -@Fluent -public final class AmlComputeProperties { - /* - * Compute OS Type - */ - @JsonProperty(value = "osType") - private OsType osType; - - /* - * Virtual Machine Size - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /* - * Virtual Machine priority - */ - @JsonProperty(value = "vmPriority") - private VmPriority vmPriority; - - /* - * Virtual Machine image for AML Compute - windows only - */ - @JsonProperty(value = "virtualMachineImage") - private VirtualMachineImage virtualMachineImage; - - /* - * Network is isolated or not - */ - @JsonProperty(value = "isolatedNetwork") - private Boolean isolatedNetwork; - - /* - * Scale settings for AML Compute - */ - @JsonProperty(value = "scaleSettings") - private ScaleSettings scaleSettings; - - /* - * Credentials for an administrator user account that will be created on - * each compute node. - */ - @JsonProperty(value = "userAccountCredentials") - private UserAccountCredentials userAccountCredentials; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - @JsonProperty(value = "subnet") - private ResourceId subnet; - - /* - * 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. - */ - @JsonProperty(value = "remoteLoginPortPublicAccess") - private RemoteLoginPortPublicAccess remoteLoginPortPublicAccess; - - /* - * 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. - */ - @JsonProperty(value = "allocationState", access = JsonProperty.Access.WRITE_ONLY) - private AllocationState allocationState; - - /* - * Allocation state transition time. The time at which the compute entered - * its current allocation state. - */ - @JsonProperty(value = "allocationStateTransitionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime allocationStateTransitionTime; - - /* - * Errors. Collection of errors encountered by various compute nodes during - * node setup. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * Current node count. The number of compute nodes currently assigned to - * the compute. - */ - @JsonProperty(value = "currentNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer currentNodeCount; - - /* - * Target node count. 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. - */ - @JsonProperty(value = "targetNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer targetNodeCount; - - /* - * Counts of various node states on the compute. - */ - @JsonProperty(value = "nodeStateCounts", access = JsonProperty.Access.WRITE_ONLY) - private NodeStateCounts nodeStateCounts; - - /* - * Enable node public IP. 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. - */ - @JsonProperty(value = "enableNodePublicIp") - private Boolean enableNodePublicIp; - - /* - * A property bag containing additional properties. - */ - @JsonProperty(value = "propertyBag") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map propertyBag; - - /** - * 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: 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. - * - * @return the remoteLoginPortPublicAccess value. - */ - public RemoteLoginPortPublicAccess remoteLoginPortPublicAccess() { - return this.remoteLoginPortPublicAccess; - } - - /** - * Set the remoteLoginPortPublicAccess property: 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. - * - * @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. 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: Allocation state transition time. 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: Errors. 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: Current node count. The number of compute nodes currently assigned to the - * compute. - * - * @return the currentNodeCount value. - */ - public Integer currentNodeCount() { - return this.currentNodeCount; - } - - /** - * Get the targetNodeCount property: Target node count. 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 node public IP. 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 node public IP. 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 Map 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(Map 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(); - } - } -} 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 b6c1d9047d0ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties(top level) of AmlCompute. */ -@Fluent -public class AmlComputeSchema { - /* - * Properties of AmlCompute - */ - @JsonProperty(value = "properties") - private AmlComputeProperties properties; - - /** - * 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(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.java deleted file mode 100644 index 89261a24cb42c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperation.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.resourcemanager.machinelearning.fluent.models.AmlOperationInner; - -/** An immutable client-side representation of AmlOperation. */ -public interface AmlOperation { - /** - * Gets the name property: Operation name: {provider}/{resource}/{operation}. - * - * @return the name value. - */ - String name(); - - /** - * Gets the display property: Display name of operation. - * - * @return the display value. - */ - AmlOperationDisplay display(); - - /** - * Gets the isDataAction property: Indicates whether the operation applies to data-plane. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner object. - * - * @return the inner object. - */ - AmlOperationInner innerModel(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java deleted file mode 100644 index 380a81a1314b1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.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.fasterxml.jackson.annotation.JsonProperty; - -/** Display name of operation. */ -@Fluent -public final class AmlOperationDisplay { - /* - * The resource provider name: Microsoft.MachineLearningExperimentation - */ - @JsonProperty(value = "provider") - private String provider; - - /* - * The resource on which the operation is performed. - */ - @JsonProperty(value = "resource") - private String resource; - - /* - * The operation that users can perform. - */ - @JsonProperty(value = "operation") - private String operation; - - /* - * The description for the operation. - */ - @JsonProperty(value = "description") - private String description; - - /** - * Get the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: The resource provider name: Microsoft.MachineLearningExperimentation. - * - * @param provider the provider value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: The resource on which the operation is performed. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: The resource on which the operation is performed. - * - * @param resource the resource value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: The operation that users can perform. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: The operation that users can perform. - * - * @param operation the operation value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: The description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description for the operation. - * - * @param description the description value to set. - * @return the AmlOperationDisplay object itself. - */ - public AmlOperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java deleted file mode 100644 index 13b9c458027b9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** An array of operations supported by the resource provider. */ -@Fluent -public final class AmlOperationListResult { - /* - * List of AML workspace operations supported by the AML workspace resource - * provider. - */ - @JsonProperty(value = "value") - private List value; - - /** - * Get the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: List of AML workspace operations supported by the AML workspace resource provider. - * - * @param value the value value to set. - * @return the AmlOperationListResult object itself. - */ - public AmlOperationListResult 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()); - } - } -} 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 18fc827b87e40..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** AML Token identity configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") -@JsonTypeName("AMLToken") -@Immutable -public final class AmlToken extends IdentityConfiguration { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 8fa6accfeb214..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlUserFeature.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.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/ApplicationSharingPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.java deleted file mode 100644 index 176121795a76a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ApplicationSharingPolicy. */ -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 or finds a ApplicationSharingPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationSharingPolicy. - */ - @JsonCreator - 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/AssetBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.java deleted file mode 100644 index fdcc76aee4bb4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The AssetBase model. */ -@Fluent -public class AssetBase extends ResourceBase { - /* - * If the name version are system generated (anonymous registration). - */ - @JsonProperty(value = "isAnonymous") - private Boolean isAnonymous; - - /* - * Is the asset archived? - */ - @JsonProperty(value = "isArchived") - private Boolean isArchived; - - /** - * 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; - } - - /** - * 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; - } - - /** {@inheritDoc} */ - @Override - public AssetBase withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AssetBase withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AssetBase 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(); - } -} 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 1abf68c3f5662..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The AssetContainer model. */ -@Fluent -public class AssetContainer extends ResourceBase { - /* - * Is the asset archived? - */ - @JsonProperty(value = "isArchived") - private Boolean isArchived; - - /* - * The latest version inside this container. - */ - @JsonProperty(value = "latestVersion", access = JsonProperty.Access.WRITE_ONLY) - private String latestVersion; - - /* - * The next auto incremental version - */ - @JsonProperty(value = "nextVersion", access = JsonProperty.Access.WRITE_ONLY) - private String nextVersion; - - /** - * 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; - } - - /** - * Get the nextVersion property: The next auto incremental version. - * - * @return the nextVersion value. - */ - public String nextVersion() { - return this.nextVersion; - } - - /** {@inheritDoc} */ - @Override - public AssetContainer withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AssetContainer withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AssetContainer 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(); - } -} 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 96ca6b50b28a2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Asset input type. */ -@Fluent -public class AssetJobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (uri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model AssetJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssetJobInput.class); -} 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 751eedc3f0e06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Asset output type. */ -@Fluent -public class AssetJobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 70b370864db83..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for asset references. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "referenceType", - defaultImpl = AssetReferenceBase.class) -@JsonTypeName("AssetReferenceBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataPath", value = DataPathAssetReference.class), - @JsonSubTypes.Type(name = "Id", value = IdAssetReference.class), - @JsonSubTypes.Type(name = "OutputPath", value = OutputPathAssetReference.class) -}) -@Immutable -public class AssetReferenceBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 e3f592ceda5bb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A user that can be assigned to a compute instance. */ -@Fluent -public final class AssignedUser { - /* - * User’s AAD Object Id. - */ - @JsonProperty(value = "objectId", required = true) - private String objectId; - - /* - * User’s AAD Tenant Id. - */ - @JsonProperty(value = "tenantId", required = true) - private String tenantId; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property objectId in model AssignedUser")); - } - if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property tenantId in model AssignedUser")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AssignedUser.class); -} 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 6eb5a7464053d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Forecast horizon determined automatically by system. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Auto") -@Immutable -public final class AutoForecastHorizon extends ForecastHorizon { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 f4f8de510edeb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -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. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") -@JsonTypeName("AutoML") -@Fluent -public final class AutoMLJob extends JobBaseDetails { - /* - * 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. - */ - @JsonProperty(value = "environmentId") - private String environmentId; - - /* - * Environment variables included in the job. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * Mapping of output data bindings used in the job. - */ - @JsonProperty(value = "outputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map outputs; - - /* - * Compute Resource configuration for the job. - */ - @JsonProperty(value = "resources") - private ResourceConfiguration resources; - - /* - * [Required] This represents scenario which can be one of Tables/NLP/Image - */ - @JsonProperty(value = "taskDetails", required = true) - private AutoMLVertical taskDetails; - - /** - * 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 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 resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public ResourceConfiguration 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(ResourceConfiguration resources) { - this.resources = resources; - 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; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** {@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 withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AutoMLJob 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 (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (resources() != null) { - resources().validate(); - } - if (taskDetails() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property taskDetails in model AutoMLJob")); - } else { - taskDetails().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoMLJob.class); -} 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 816c0b483a090..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** AutoML vertical class. Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "taskType", - defaultImpl = AutoMLVertical.class) -@JsonTypeName("AutoMLVertical") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Classification", value = Classification.class), - @JsonSubTypes.Type(name = "Forecasting", value = Forecasting.class), - @JsonSubTypes.Type(name = "ImageClassification", value = ImageClassification.class), - @JsonSubTypes.Type(name = "ImageClassificationMultilabel", value = ImageClassificationMultilabel.class), - @JsonSubTypes.Type(name = "ImageInstanceSegmentation", value = ImageInstanceSegmentation.class), - @JsonSubTypes.Type(name = "ImageObjectDetection", value = ImageObjectDetection.class), - @JsonSubTypes.Type(name = "Regression", value = Regression.class), - @JsonSubTypes.Type(name = "TextClassification", value = TextClassification.class), - @JsonSubTypes.Type(name = "TextClassificationMultilabel", value = TextClassificationMultilabel.class), - @JsonSubTypes.Type(name = "TextNER", value = TextNer.class) -}) -@Fluent -public class AutoMLVertical { - /* - * Log verbosity for the job. - */ - @JsonProperty(value = "logVerbosity") - private LogVerbosity logVerbosity; - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 177a96d92716e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** N-Cross validations determined automatically. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Auto") -@Immutable -public final class AutoNCrossValidations extends NCrossValidations { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 02ab158e712b3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Auto pause properties. */ -@Fluent -public final class AutoPauseProperties { - /* - * The delayInMinutes property. - */ - @JsonProperty(value = "delayInMinutes") - private Integer delayInMinutes; - - /* - * The enabled property. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /** - * 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() { - } -} 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 90ff04e39be14..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.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.fasterxml.jackson.annotation.JsonProperty; - -/** Auto scale properties. */ -@Fluent -public final class AutoScaleProperties { - /* - * The minNodeCount property. - */ - @JsonProperty(value = "minNodeCount") - private Integer minNodeCount; - - /* - * The enabled property. - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The maxNodeCount property. - */ - @JsonProperty(value = "maxNodeCount") - private Integer maxNodeCount; - - /** - * 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() { - } -} 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 451241be1f696..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The AutoSeasonality model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Auto") -@Immutable -public final class AutoSeasonality extends Seasonality { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 d8781e9bca1d5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The AutoTargetLags model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Auto") -@Immutable -public final class AutoTargetLags extends TargetLags { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 33f8abca55543..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Target lags rolling window determined automatically. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Auto") -@Immutable -public final class AutoTargetRollingWindowSize extends TargetRollingWindowSize { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 2164a91fb63e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Autosave. */ -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 or finds a Autosave from its string representation. - * - * @param name a name to look for. - * @return the corresponding Autosave. - */ - @JsonCreator - 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 3b33d6574d4e7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Azure Blob datastore configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") -@JsonTypeName("AzureBlob") -@Fluent -public final class AzureBlobDatastore extends DatastoreDetails { - /* - * Storage account name. - */ - @JsonProperty(value = "accountName") - private String accountName; - - /* - * Storage account container name. - */ - @JsonProperty(value = "containerName") - private String containerName; - - /* - * Azure cloud endpoint for the storage account. - */ - @JsonProperty(value = "endpoint") - private String endpoint; - - /* - * Protocol used to communicate with the storage account. - */ - @JsonProperty(value = "protocol") - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. - */ - @JsonProperty(value = "serviceDataAccessAuthIdentity") - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /** - * 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; - } - - /** {@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 withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureBlobDatastore 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(); - } -} 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 a22c78a502e9d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Azure Data Lake Gen1 datastore configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") -@JsonTypeName("AzureDataLakeGen1") -@Fluent -public final class AzureDataLakeGen1Datastore extends DatastoreDetails { - /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. - */ - @JsonProperty(value = "serviceDataAccessAuthIdentity") - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /* - * [Required] Azure Data Lake store name. - */ - @JsonProperty(value = "storeName", required = true) - private String storeName; - - /** - * 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 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; - } - - /** {@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 withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureDataLakeGen1Datastore 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 (storeName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storeName in model AzureDataLakeGen1Datastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen1Datastore.class); -} 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 c1952e55d9b1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Azure Data Lake Gen2 datastore configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") -@JsonTypeName("AzureDataLakeGen2") -@Fluent -public final class AzureDataLakeGen2Datastore extends DatastoreDetails { - /* - * [Required] Storage account name. - */ - @JsonProperty(value = "accountName", required = true) - private String accountName; - - /* - * Azure cloud endpoint for the storage account. - */ - @JsonProperty(value = "endpoint") - private String endpoint; - - /* - * [Required] The name of the Data Lake Gen2 filesystem. - */ - @JsonProperty(value = "filesystem", required = true) - private String filesystem; - - /* - * Protocol used to communicate with the storage account. - */ - @JsonProperty(value = "protocol") - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. - */ - @JsonProperty(value = "serviceDataAccessAuthIdentity") - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /** - * 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 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 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; - } - - /** {@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 withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureDataLakeGen2Datastore 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 (accountName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property accountName in model AzureDataLakeGen2Datastore")); - } - if (filesystem() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property filesystem in model AzureDataLakeGen2Datastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureDataLakeGen2Datastore.class); -} 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 2c7d422adc329..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Azure File datastore configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") -@JsonTypeName("AzureFile") -@Fluent -public final class AzureFileDatastore extends DatastoreDetails { - /* - * [Required] Storage account name. - */ - @JsonProperty(value = "accountName", required = true) - private String accountName; - - /* - * Azure cloud endpoint for the storage account. - */ - @JsonProperty(value = "endpoint") - private String endpoint; - - /* - * [Required] The name of the Azure file share that the datastore points - * to. - */ - @JsonProperty(value = "fileShareName", required = true) - private String fileShareName; - - /* - * Protocol used to communicate with the storage account. - */ - @JsonProperty(value = "protocol") - private String protocol; - - /* - * Indicates which identity to use to authenticate service data access to - * customer's storage. - */ - @JsonProperty(value = "serviceDataAccessAuthIdentity") - private ServiceDataAccessAuthIdentity serviceDataAccessAuthIdentity; - - /** - * 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 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 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 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; - } - - /** {@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 withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public AzureFileDatastore 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 (accountName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property accountName in model AzureFileDatastore")); - } - if (fileShareName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property fileShareName in model AzureFileDatastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AzureFileDatastore.class); -} 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 9721fc1f8f231..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") -@JsonTypeName("Bandit") -@Fluent -public final class BanditPolicy extends EarlyTerminationPolicy { - /* - * Absolute distance allowed from the best performing run. - */ - @JsonProperty(value = "slackAmount") - private Float slackAmount; - - /* - * Ratio of the allowed distance from the best performing run. - */ - @JsonProperty(value = "slackFactor") - private Float slackFactor; - - /** - * 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; - } - - /** - * 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; - } - - /** {@inheritDoc} */ - @Override - public BanditPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** {@inheritDoc} */ - @Override - public BanditPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.java deleted file mode 100644 index 71c6cb57ca7a5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentData.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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; -import java.util.Map; - -/** An immutable client-side representation of BatchDeploymentData. */ -public interface BatchDeploymentData { - /** - * 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 properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - BatchDeploymentDetails properties(); - - /** - * 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.BatchDeploymentDataInner object. - * - * @return the inner object. - */ - BatchDeploymentDataInner innerModel(); - - /** The entirety of the BatchDeploymentData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The BatchDeploymentData definition stages. */ - interface DefinitionStages { - /** The first stage of the BatchDeploymentData definition. */ - interface Blank extends WithLocation { - } - /** The stage of the BatchDeploymentData 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 BatchDeploymentData 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 BatchDeploymentData 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(BatchDeploymentDetails properties); - } - /** - * The stage of the BatchDeploymentData 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchDeploymentData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchDeploymentData create(Context context); - } - /** The stage of the BatchDeploymentData 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 BatchDeploymentData 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 BatchDeploymentData 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 BatchDeploymentData 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 BatchDeploymentData resource. - * - * @return the stage of resource update. - */ - BatchDeploymentData.Update update(); - - /** The template for BatchDeploymentData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchDeploymentData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchDeploymentData apply(Context context); - } - /** The BatchDeploymentData update stages. */ - interface UpdateStages { - /** The stage of the BatchDeploymentData 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 BatchDeploymentData 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); - } - /** The stage of the BatchDeploymentData update 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. - */ - Update withKind(String kind); - } - /** The stage of the BatchDeploymentData 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); - } - /** The stage of the BatchDeploymentData 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. - */ - BatchDeploymentData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchDeploymentData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.java deleted file mode 100644 index 210a7bc11f9de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentDetails.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Batch inference settings per deployment. */ -@Fluent -public final class BatchDeploymentDetails extends EndpointDeploymentPropertiesBase { - /* - * Compute target for batch inference operation. - */ - @JsonProperty(value = "compute") - private String compute; - - /* - * 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. - */ - @JsonProperty(value = "errorThreshold") - private Integer errorThreshold; - - /* - * Logging level for batch inference operation. - */ - @JsonProperty(value = "loggingLevel") - private BatchLoggingLevel loggingLevel; - - /* - * Indicates maximum number of parallelism per instance. - */ - @JsonProperty(value = "maxConcurrencyPerInstance") - private Integer maxConcurrencyPerInstance; - - /* - * 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. - */ - @JsonProperty(value = "miniBatchSize") - private Long miniBatchSize; - - /* - * Reference to the model asset for the endpoint deployment. - */ - @JsonProperty(value = "model") - private AssetReferenceBase model; - - /* - * Indicates how the output will be organized. - */ - @JsonProperty(value = "outputAction") - private BatchOutputAction outputAction; - - /* - * Customized output file name for append_row output action. - */ - @JsonProperty(value = "outputFileName") - private String outputFileName; - - /* - * Provisioning state for the endpoint deployment. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private DeploymentProvisioningState provisioningState; - - /* - * Indicates compute configuration for the job. - * If not provided, will default to the defaults defined in - * ResourceConfiguration. - */ - @JsonProperty(value = "resources") - private ResourceConfiguration resources; - - /* - * Retry Settings for the batch inference operation. - * If not provided, will default to the defaults defined in - * BatchRetrySettings. - */ - @JsonProperty(value = "retrySettings") - private BatchRetrySettings retrySettings; - - /** - * 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withCompute(String compute) { - this.compute = compute; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withErrorThreshold(Integer errorThreshold) { - this.errorThreshold = errorThreshold; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withModel(AssetReferenceBase model) { - this.model = model; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * 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 ResourceConfiguration 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withResources(ResourceConfiguration resources) { - this.resources = resources; - 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 BatchDeploymentDetails object itself. - */ - public BatchDeploymentDetails withRetrySettings(BatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDetails withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDetails withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDetails withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentDetails 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 (model() != null) { - model().validate(); - } - if (resources() != null) { - resources().validate(); - } - if (retrySettings() != null) { - retrySettings().validate(); - } - } -} 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 9f22d39168a3b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of BatchDeployment entities. */ -@Fluent -public final class BatchDeploymentTrackedResourceArmPaginatedResult { - /* - * The link to the next page of BatchDeployment objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type BatchDeployment. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 be41a52144294..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployments.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - BatchDeploymentData get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * 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 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}. - */ - BatchDeploymentData 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 BatchDeploymentData resource. - * - * @param name resource name. - * @return the first stage of the new BatchDeploymentData definition. - */ - BatchDeploymentData.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java deleted file mode 100644 index 08a9d25e30954..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointData.java +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; -import java.util.Map; - -/** An immutable client-side representation of BatchEndpointData. */ -public interface BatchEndpointData { - /** - * 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 properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - BatchEndpointDetails properties(); - - /** - * Gets the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - Sku sku(); - - /** - * 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.BatchEndpointDataInner object. - * - * @return the inner object. - */ - BatchEndpointDataInner innerModel(); - - /** The entirety of the BatchEndpointData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The BatchEndpointData definition stages. */ - interface DefinitionStages { - /** The first stage of the BatchEndpointData definition. */ - interface Blank extends WithLocation { - } - /** The stage of the BatchEndpointData 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 BatchEndpointData 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 BatchEndpointData 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(BatchEndpointDetails properties); - } - /** - * The stage of the BatchEndpointData 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchEndpointData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchEndpointData create(Context context); - } - /** The stage of the BatchEndpointData 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 BatchEndpointData 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 BatchEndpointData 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 BatchEndpointData 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 BatchEndpointData resource. - * - * @return the stage of resource update. - */ - BatchEndpointData.Update update(); - - /** The template for BatchEndpointData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchEndpointData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchEndpointData apply(Context context); - } - /** The BatchEndpointData update stages. */ - interface UpdateStages { - /** The stage of the BatchEndpointData 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 BatchEndpointData 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); - } - /** The stage of the BatchEndpointData update 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. - */ - Update withKind(String kind); - } - /** The stage of the BatchEndpointData 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(PartialBatchEndpoint properties); - } - /** The stage of the BatchEndpointData 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. - */ - BatchEndpointData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchEndpointData refresh(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(); - - /** - * 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); -} 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 21209aca29dd4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Batch endpoint default values. */ -@Fluent -public final class BatchEndpointDefaults { - /* - * 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. - */ - @JsonProperty(value = "deploymentName") - private String deploymentName; - - /** - * 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() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.java deleted file mode 100644 index f92ee169cc380..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDetails.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.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Batch endpoint configuration. */ -@Fluent -public final class BatchEndpointDetails extends EndpointPropertiesBaseInner { - /* - * Default values for Batch Endpoint - */ - @JsonProperty(value = "defaults") - private BatchEndpointDefaults defaults; - - /* - * Provisioning state for the endpoint. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private EndpointProvisioningState provisioningState; - - /** - * 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 BatchEndpointDetails object itself. - */ - public BatchEndpointDetails 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; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDetails withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDetails withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointDetails 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 (defaults() != null) { - defaults().validate(); - } - } -} 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 17a0ff64a08ae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of BatchEndpoint entities. */ -@Fluent -public final class BatchEndpointTrackedResourceArmPaginatedResult { - /* - * The link to the next page of BatchEndpoint objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type BatchEndpoint. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 8e4c962dbe785..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoints.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; - -/** 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - BatchEndpointData get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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}. - */ - BatchEndpointData 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 BatchEndpointData resource. - * - * @param name resource name. - * @return the first stage of the new BatchEndpointData definition. - */ - BatchEndpointData.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 ec83803d333be..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BatchLoggingLevel. */ -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 or finds a BatchLoggingLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchLoggingLevel. - */ - @JsonCreator - 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 710dfa816d474..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BatchOutputAction. */ -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 or finds a BatchOutputAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchOutputAction. - */ - @JsonCreator - 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/BatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.java deleted file mode 100644 index 8f5e019eb132a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Retry settings for a batch inference operation. */ -@Fluent -public final class BatchRetrySettings { - /* - * Maximum retry count for a mini-batch - */ - @JsonProperty(value = "maxRetries") - private Integer maxRetries; - - /* - * Invocation timeout for a mini-batch, in ISO 8601 format. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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() { - } -} 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 1fb6d0448a02f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines a Sampling Algorithm that generates values based on previous values. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") -@JsonTypeName("Bayesian") -@Immutable -public final class BayesianSamplingAlgorithm extends SamplingAlgorithm { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 f91f3093edac1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for BillingCurrency. */ -public final class BillingCurrency extends ExpandableStringEnum { - /** Static value USD for BillingCurrency. */ - public static final BillingCurrency USD = fromString("USD"); - - /** - * Creates or finds a BillingCurrency from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCurrency. - */ - @JsonCreator - 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/BuildContext.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java deleted file mode 100644 index 480d894d34337..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration settings for Docker build context. */ -@Fluent -public final class BuildContext { - /* - * [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. - * - */ - @JsonProperty(value = "contextUri", required = true) - private String contextUri; - - /* - * Path to the Dockerfile in the build context. - * - */ - @JsonProperty(value = "dockerfilePath") - private String dockerfilePath; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property contextUri in model BuildContext")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuildContext.class); -} 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 b39408947e2ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Caching. */ -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 or finds a Caching from its string representation. - * - * @param name a name to look for. - * @return the corresponding Caching. - */ - @JsonCreator - 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/CertificateDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java deleted file mode 100644 index 30953bfee4b56..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.UUID; - -/** Certificate datastore credentials configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("Certificate") -@Fluent -public final class CertificateDatastoreCredentials extends DatastoreCredentials { - /* - * Authority URL used for authentication. - */ - @JsonProperty(value = "authorityUrl") - private String authorityUrl; - - /* - * [Required] Service principal client ID. - */ - @JsonProperty(value = "clientId", required = true) - private UUID clientId; - - /* - * Resource the service principal has access to. - */ - @JsonProperty(value = "resourceUrl") - private String resourceUrl; - - /* - * [Required] Service principal secrets. - */ - @JsonProperty(value = "secrets", required = true) - private CertificateDatastoreSecrets secrets; - - /* - * [Required] ID of the tenant to which the service principal belongs. - */ - @JsonProperty(value = "tenantId", required = true) - private UUID tenantId; - - /* - * [Required] Thumbprint of the certificate used for authentication. - */ - @JsonProperty(value = "thumbprint", required = true) - private String thumbprint; - - /** - * 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 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 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 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; - } - - /** - * 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model CertificateDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model CertificateDatastoreCredentials")); - } else { - secrets().validate(); - } - if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tenantId in model CertificateDatastoreCredentials")); - } - if (thumbprint() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property thumbprint in model CertificateDatastoreCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateDatastoreCredentials.class); -} 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 86d2e9c9e142c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Datastore certificate secrets. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("Certificate") -@Fluent -public final class CertificateDatastoreSecrets extends DatastoreSecretsInner { - /* - * Service principal certificate. - */ - @JsonProperty(value = "certificate") - private String certificate; - - /** - * 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(); - } -} 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 444af27aa8ca2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Classification task in AutoML Table vertical. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("Classification") -@Fluent -public final class Classification extends AutoMLVertical { - /* - * Allowed models for classification task. - */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for classification task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; - - /* - * Primary metric for the task. - */ - @JsonProperty(value = "primaryMetric") - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; - - /** - * Get the allowedModels property: Allowed models for classification task. - * - * @return the allowedModels value. - */ - public List allowedModels() { - return this.allowedModels; - } - - /** - * Set the allowedModels property: Allowed models for classification task. - * - * @param allowedModels the allowedModels value to set. - * @return the Classification object itself. - */ - public Classification withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } - - /** - * Get the blockedModels property: Blocked models for classification task. - * - * @return the blockedModels value. - */ - public List blockedModels() { - return this.blockedModels; - } - - /** - * Set the blockedModels property: Blocked models for classification task. - * - * @param blockedModels the blockedModels value to set. - * @return the Classification object itself. - */ - public Classification withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - return this; - } - - /** - * 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the Classification object itself. - */ - public Classification withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** - * 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 trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public TrainingSettings 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(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public Classification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - } -} 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 ae45624e07f81..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ClassificationModels. */ -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 or finds a ClassificationModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationModels. - */ - @JsonCreator - 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 32fe7a12c0560..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ClassificationMultilabelPrimaryMetrics. */ -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 or finds a ClassificationMultilabelPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationMultilabelPrimaryMetrics. - */ - @JsonCreator - 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 1e20e6e6853af..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ClassificationPrimaryMetrics. */ -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 or finds a ClassificationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationPrimaryMetrics. - */ - @JsonCreator - 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/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java deleted file mode 100644 index 34a85929d73af..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ClusterPurpose. */ -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 or finds a ClusterPurpose from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPurpose. - */ - @JsonCreator - 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 045b388520ad5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** AmlCompute update parameters. */ -@Fluent -public final class ClusterUpdateParameters { - /* - * The properties of the amlCompute. - */ - @JsonProperty(value = "properties") - private ClusterUpdateProperties innerProperties; - - /** - * 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(); - } - } -} 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 d0d7937bab0c3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration for a scoring code asset. */ -@Fluent -public final class CodeConfiguration { - /* - * ARM resource ID of the code asset. - */ - @JsonProperty(value = "codeId") - private String codeId; - - /* - * [Required] The script to execute on startup. eg. "score.py" - */ - @JsonProperty(value = "scoringScript", required = true) - private String scoringScript; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property scoringScript in model CodeConfiguration")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeConfiguration.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.java deleted file mode 100644 index 9573580903bb1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; - -/** An immutable client-side representation of CodeContainerData. */ -public interface CodeContainerData { - /** - * 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. - */ - CodeContainerDetails 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.CodeContainerDataInner object. - * - * @return the inner object. - */ - CodeContainerDataInner innerModel(); - - /** The entirety of the CodeContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The CodeContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the CodeContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the CodeContainerData 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 CodeContainerData 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(CodeContainerDetails properties); - } - /** - * The stage of the CodeContainerData 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. - */ - CodeContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeContainerData create(Context context); - } - } - /** - * Begins update for the CodeContainerData resource. - * - * @return the stage of resource update. - */ - CodeContainerData.Update update(); - - /** The template for CodeContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeContainerData apply(Context context); - } - /** The CodeContainerData update stages. */ - interface UpdateStages { - /** The stage of the CodeContainerData 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(CodeContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.java deleted file mode 100644 index 76f0d72d1f46e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerDetails.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.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** Container for code asset versions. */ -@Fluent -public final class CodeContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerDetails 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(); - } -} 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 083dc6e2162d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of CodeContainer entities. */ -@Fluent -public final class CodeContainerResourceArmPaginatedResult { - /* - * The link to the next page of CodeContainer objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type CodeContainer. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 28853ffc3b5f9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainers.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - Response deleteWithResponse(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. - */ - CodeContainerData get(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 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}. - */ - CodeContainerData 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 CodeContainerData resource. - * - * @param name resource name. - * @return the first stage of the new CodeContainerData definition. - */ - CodeContainerData.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.java deleted file mode 100644 index b58a352255468..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; - -/** An immutable client-side representation of CodeVersionData. */ -public interface CodeVersionData { - /** - * 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. - */ - CodeVersionDetails 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.CodeVersionDataInner object. - * - * @return the inner object. - */ - CodeVersionDataInner innerModel(); - - /** The entirety of the CodeVersionData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The CodeVersionData definition stages. */ - interface DefinitionStages { - /** The first stage of the CodeVersionData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the CodeVersionData 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 CodeVersionData 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(CodeVersionDetails properties); - } - /** - * The stage of the CodeVersionData 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. - */ - CodeVersionData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeVersionData create(Context context); - } - } - /** - * Begins update for the CodeVersionData resource. - * - * @return the stage of resource update. - */ - CodeVersionData.Update update(); - - /** The template for CodeVersionData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeVersionData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeVersionData apply(Context context); - } - /** The CodeVersionData update stages. */ - interface UpdateStages { - /** The stage of the CodeVersionData 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(CodeVersionDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeVersionData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeVersionData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.java deleted file mode 100644 index fe0770db7deef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionDetails.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Code asset version details. */ -@Fluent -public final class CodeVersionDetails extends AssetBase { - /* - * Uri where code is located - */ - @JsonProperty(value = "codeUri") - private String codeUri; - - /** - * 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 CodeVersionDetails object itself. - */ - public CodeVersionDetails withCodeUri(String codeUri) { - this.codeUri = codeUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionDetails withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionDetails 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(); - } -} 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 9b0d2f605dd27..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of CodeVersion entities. */ -@Fluent -public final class CodeVersionResourceArmPaginatedResult { - /* - * The link to the next page of CodeVersion objects. If null, there are no - * additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type CodeVersion. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 3555605058013..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersions.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.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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - 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. - * @return the {@link Response}. - */ - Response deleteWithResponse( - 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. - */ - CodeVersionData get(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 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}. - */ - CodeVersionData 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 CodeVersionData resource. - * - * @param name resource name. - * @return the first stage of the new CodeVersionData definition. - */ - CodeVersionData.DefinitionStages.Blank define(String name); -} 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 510e41ac10bad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Column transformer parameters. */ -@Fluent -public final class ColumnTransformer { - /* - * Fields to apply transformer logic on. - */ - @JsonProperty(value = "fields") - private List fields; - - /* - * Different properties to be passed to transformer. - * Input expected is dictionary of key,value pairs in JSON format. - */ - @JsonProperty(value = "parameters") - private Object parameters; - - /** - * 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() { - } -} 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 5c42daaa81e7a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Command job definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") -@JsonTypeName("Command") -@Fluent -public final class CommandJob extends JobBaseDetails { - /* - * ARM resource ID of the code asset. - */ - @JsonProperty(value = "codeId") - private String codeId; - - /* - * [Required] The command to execute on startup of the job. eg. "python - * train.py" - */ - @JsonProperty(value = "command", required = true) - private String command; - - /* - * Distribution configuration of the job. If set, this should be one of - * Mpi, Tensorflow, PyTorch, or null. - */ - @JsonProperty(value = "distribution") - private DistributionConfiguration distribution; - - /* - * [Required] The ARM resource ID of the Environment specification for the - * job. - */ - @JsonProperty(value = "environmentId", required = true) - private String environmentId; - - /* - * Environment variables included in the job. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * Mapping of input data bindings used in the job. - */ - @JsonProperty(value = "inputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map inputs; - - /* - * Command Job limit. - */ - @JsonProperty(value = "limits") - private CommandJobLimits limits; - - /* - * Mapping of output data bindings used in the job. - */ - @JsonProperty(value = "outputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map outputs; - - /* - * Input parameters. - */ - @JsonProperty(value = "parameters", access = JsonProperty.Access.WRITE_ONLY) - private Object parameters; - - /* - * Compute Resource configuration for the job. - */ - @JsonProperty(value = "resources") - private ResourceConfiguration resources; - - /** - * 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 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 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 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 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 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 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 parameters property: Input parameters. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Get the resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public ResourceConfiguration 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(ResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** {@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 withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob 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 (command() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property command in model CommandJob")); - } - if (distribution() != null) { - distribution().validate(); - } - if (environmentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property environmentId in model CommandJob")); - } - if (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (limits() != null) { - limits().validate(); - } - if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (resources() != null) { - resources().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CommandJob.class); -} 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 95b8cca543dc4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.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.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Command Job limit class. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobLimitsType") -@JsonTypeName("Command") -@Fluent -public final class CommandJobLimits extends JobLimits { - /** {@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(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.java deleted file mode 100644 index 348d61274d194..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; - -/** An immutable client-side representation of ComponentContainerData. */ -public interface ComponentContainerData { - /** - * 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. - */ - ComponentContainerDetails 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.ComponentContainerDataInner object. - * - * @return the inner object. - */ - ComponentContainerDataInner innerModel(); - - /** The entirety of the ComponentContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ComponentContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the ComponentContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ComponentContainerData 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 ComponentContainerData 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(ComponentContainerDetails properties); - } - /** - * The stage of the ComponentContainerData 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. - */ - ComponentContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentContainerData create(Context context); - } - } - /** - * Begins update for the ComponentContainerData resource. - * - * @return the stage of resource update. - */ - ComponentContainerData.Update update(); - - /** The template for ComponentContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentContainerData apply(Context context); - } - /** The ComponentContainerData update stages. */ - interface UpdateStages { - /** The stage of the ComponentContainerData 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(ComponentContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.java deleted file mode 100644 index 194613dc4553d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerDetails.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.annotation.Fluent; -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 ComponentContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public ComponentContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerDetails 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(); - } -} 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 728f0888c6d48..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of ComponentContainer entities. */ -@Fluent -public final class ComponentContainerResourceArmPaginatedResult { - /* - * The link to the next page of ComponentContainer objects. If null, there - * are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type ComponentContainer. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 a282817936b57..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainers.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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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. - */ - ComponentContainerData get(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 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}. - */ - ComponentContainerData 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 ComponentContainerData resource. - * - * @param name resource name. - * @return the first stage of the new ComponentContainerData definition. - */ - ComponentContainerData.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.java deleted file mode 100644 index f10b5ef1c0212..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; - -/** An immutable client-side representation of ComponentVersionData. */ -public interface ComponentVersionData { - /** - * 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. - */ - ComponentVersionDetails 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.ComponentVersionDataInner object. - * - * @return the inner object. - */ - ComponentVersionDataInner innerModel(); - - /** The entirety of the ComponentVersionData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ComponentVersionData definition stages. */ - interface DefinitionStages { - /** The first stage of the ComponentVersionData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ComponentVersionData 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 ComponentVersionData 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(ComponentVersionDetails properties); - } - /** - * The stage of the ComponentVersionData 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. - */ - ComponentVersionData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentVersionData create(Context context); - } - } - /** - * Begins update for the ComponentVersionData resource. - * - * @return the stage of resource update. - */ - ComponentVersionData.Update update(); - - /** The template for ComponentVersionData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentVersionData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentVersionData apply(Context context); - } - /** The ComponentVersionData update stages. */ - interface UpdateStages { - /** The stage of the ComponentVersionData 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(ComponentVersionDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentVersionData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentVersionData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.java deleted file mode 100644 index 83c9494380180..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionDetails.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Definition of a component version: defines resources that span component types. */ -@Fluent -public final class ComponentVersionDetails extends AssetBase { - /* - * Defines Component definition details. - * - */ - @JsonProperty(value = "componentSpec") - private Object componentSpec; - - /** - * 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 ComponentVersionDetails object itself. - */ - public ComponentVersionDetails withComponentSpec(Object componentSpec) { - this.componentSpec = componentSpec; - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionDetails withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionDetails 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(); - } -} 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 58cc3eb90ab48..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of ComponentVersion entities. */ -@Fluent -public final class ComponentVersionResourceArmPaginatedResult { - /* - * The link to the next page of ComponentVersion objects. If null, there - * are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type ComponentVersion. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 0778a179a33b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersions.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @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); - - /** - * 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. - */ - ComponentVersionData get(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 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}. - */ - ComponentVersionData 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 ComponentVersionData resource. - * - * @param name resource name. - * @return the first stage of the new ComponentVersionData definition. - */ - ComponentVersionData.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 ad954b0114c74..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; -import java.util.List; - -/** Machine Learning compute object. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "computeType", - defaultImpl = Compute.class) -@JsonTypeName("Compute") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AKS", value = Aks.class), - @JsonSubTypes.Type(name = "Kubernetes", value = Kubernetes.class), - @JsonSubTypes.Type(name = "AmlCompute", value = AmlCompute.class), - @JsonSubTypes.Type(name = "ComputeInstance", value = ComputeInstance.class), - @JsonSubTypes.Type(name = "VirtualMachine", value = VirtualMachine.class), - @JsonSubTypes.Type(name = "HDInsight", value = HDInsight.class), - @JsonSubTypes.Type(name = "DataFactory", value = DataFactory.class), - @JsonSubTypes.Type(name = "Databricks", value = Databricks.class), - @JsonSubTypes.Type(name = "DataLakeAnalytics", value = DataLakeAnalytics.class), - @JsonSubTypes.Type(name = "SynapseSpark", value = SynapseSpark.class) -}) -@Fluent -public class Compute { - /* - * Location for the underlying compute - */ - @JsonProperty(value = "computeLocation", access = JsonProperty.Access.WRITE_ONLY) - private String computeLocation; - - /* - * The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningState provisioningState; - - /* - * The description of the Machine Learning compute. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The time at which the compute was created. - */ - @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdOn; - - /* - * The time at which the compute was last modified. - */ - @JsonProperty(value = "modifiedOn", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime modifiedOn; - - /* - * ARM resource id of the underlying compute - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /* - * Errors during provisioning - */ - @JsonProperty(value = "provisioningErrors", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "isAttachedCompute", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isAttachedCompute; - - /* - * Opt-out of local authentication and ensure customers can use only MSI - * and AAD exclusively for authentication. - */ - @JsonProperty(value = "disableLocalAuth") - private Boolean disableLocalAuth; - - /** - * Get the computeLocation property: Location for the underlying compute. - * - * @return the computeLocation value. - */ - public String computeLocation() { - return this.computeLocation; - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * Get the modifiedOn property: The time at which the compute was last modified. - * - * @return the modifiedOn value. - */ - public OffsetDateTime modifiedOn() { - return this.modifiedOn; - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * 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() { - } -} 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 3e55284c79097..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** An Azure Machine Learning compute instance. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("ComputeInstance") -@Fluent -public final class ComputeInstance extends Compute { - /* - * Properties of ComputeInstance - */ - @JsonProperty(value = "properties") - private ComputeInstanceProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 911b3c2a48877..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines an Aml Instance application and its connectivity endpoint URI. */ -@Fluent -public final class ComputeInstanceApplication { - /* - * Name of the ComputeInstance application. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Application' endpoint URI. - */ - @JsonProperty(value = "endpointUri") - private String endpointUri; - - /** - * 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() { - } -} 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 c3b2025c94cd6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeInstanceAuthorizationType. */ -public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { - /** Static value personal for ComputeInstanceAuthorizationType. */ - public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); - - /** - * Creates or finds a ComputeInstanceAuthorizationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceAuthorizationType. - */ - @JsonCreator - 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 3ed3353f6e7b8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Defines all connectivity endpoints and properties for an ComputeInstance. */ -@Immutable -public final class ComputeInstanceConnectivityEndpoints { - /* - * Public IP Address of this ComputeInstance. - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * Private IP Address of this ComputeInstance (local to the VNET in which - * the compute instance is deployed). - */ - @JsonProperty(value = "privateIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String privateIpAddress; - - /** - * 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() { - } -} 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 1bc1fd8c4d5ad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Defines an Aml Instance container. */ -@Fluent -public final class ComputeInstanceContainer { - /* - * Name of the ComputeInstance container. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Auto save settings. - */ - @JsonProperty(value = "autosave") - private Autosave autosave; - - /* - * Information of GPU. - */ - @JsonProperty(value = "gpu") - private String gpu; - - /* - * network of this container. - */ - @JsonProperty(value = "network") - private Network network; - - /* - * Environment information of this container. - */ - @JsonProperty(value = "environment") - private ComputeInstanceEnvironmentInfo environment; - - /* - * services of this containers. - */ - @JsonProperty(value = "services", access = JsonProperty.Access.WRITE_ONLY) - private List services; - - /** - * 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(); - } - } -} 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 66ad36df4c659..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Describes information on user who created this ComputeInstance. */ -@Immutable -public final class ComputeInstanceCreatedBy { - /* - * Name of the user. - */ - @JsonProperty(value = "userName", access = JsonProperty.Access.WRITE_ONLY) - private String username; - - /* - * Uniquely identifies user' Azure Active Directory organization. - */ - @JsonProperty(value = "userOrgId", access = JsonProperty.Access.WRITE_ONLY) - private String userOrgId; - - /* - * Uniquely identifies the user within his/her organization. - */ - @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) - private String userId; - - /** - * 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() { - } -} 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 2a51e2588b51e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.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.fasterxml.jackson.annotation.JsonProperty; - -/** Defines an Aml Instance DataDisk. */ -@Fluent -public final class ComputeInstanceDataDisk { - /* - * Caching type of Data Disk. - */ - @JsonProperty(value = "caching") - private Caching caching; - - /* - * The initial disk size in gigabytes. - */ - @JsonProperty(value = "diskSizeGB") - private Integer diskSizeGB; - - /* - * The logical unit number. The lun is used to uniquely identify each data - * disk. If attaching multiple disks, each should have a distinct lun. - */ - @JsonProperty(value = "lun") - private Integer lun; - - /* - * type of this storage account. - */ - @JsonProperty(value = "storageAccountType") - private StorageAccountType storageAccountType; - - /** - * 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 logical unit number. 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 logical unit number. 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() { - } -} 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 5620dcfe07333..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.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.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Defines an Aml Instance DataMount. */ -@Fluent -public final class ComputeInstanceDataMount { - /* - * Source of the ComputeInstance data mount. - */ - @JsonProperty(value = "source") - private String source; - - /* - * Data source type. - */ - @JsonProperty(value = "sourceType") - private SourceType sourceType; - - /* - * name of the ComputeInstance data mount. - */ - @JsonProperty(value = "mountName") - private String mountName; - - /* - * Mount Action. - */ - @JsonProperty(value = "mountAction") - private MountAction mountAction; - - /* - * who this data mount created by. - */ - @JsonProperty(value = "createdBy") - private String createdBy; - - /* - * Path of this data mount. - */ - @JsonProperty(value = "mountPath") - private String mountPath; - - /* - * Mount state. - */ - @JsonProperty(value = "mountState") - private MountState mountState; - - /* - * Mounted time. The time when the disk mounted. - */ - @JsonProperty(value = "mountedOn") - private OffsetDateTime mountedOn; - - /* - * Error of this data mount. - */ - @JsonProperty(value = "error") - private String error; - - /** - * 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: Mounted time. The time when the disk mounted. - * - * @return the mountedOn value. - */ - public OffsetDateTime mountedOn() { - return this.mountedOn; - } - - /** - * Set the mountedOn property: Mounted time. 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() { - } -} 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 821a64d74ee1b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Environment information. */ -@Fluent -public final class ComputeInstanceEnvironmentInfo { - /* - * name of environment. - */ - @JsonProperty(value = "name") - private String name; - - /* - * version of environment. - */ - @JsonProperty(value = "version") - private String version; - - /** - * 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() { - } -} 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 714b6e8abef29..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The last operation on ComputeInstance. */ -@Fluent -public final class ComputeInstanceLastOperation { - /* - * Name of the last operation. - */ - @JsonProperty(value = "operationName") - private OperationName operationName; - - /* - * Time of the last operation. - */ - @JsonProperty(value = "operationTime") - private OffsetDateTime operationTime; - - /* - * Operation status. - */ - @JsonProperty(value = "operationStatus") - private OperationStatus operationStatus; - - /* - * Trigger of operation. - */ - @JsonProperty(value = "operationTrigger") - private OperationTrigger operationTrigger; - - /** - * 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() { - } -} 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 3b554e6403b23..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java +++ /dev/null @@ -1,458 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Compute Instance properties. */ -@Fluent -public final class ComputeInstanceProperties { - /* - * Virtual Machine Size - */ - @JsonProperty(value = "vmSize") - private String vmSize; - - /* - * Virtual network subnet resource ID the compute nodes belong to. - */ - @JsonProperty(value = "subnet") - private ResourceId subnet; - - /* - * 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. - */ - @JsonProperty(value = "applicationSharingPolicy") - private ApplicationSharingPolicy applicationSharingPolicy; - - /* - * Specifies policy and settings for SSH access. - */ - @JsonProperty(value = "sshSettings") - private ComputeInstanceSshSettings sshSettings; - - /* - * Describes all connectivity endpoints available for this ComputeInstance. - */ - @JsonProperty(value = "connectivityEndpoints", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceConnectivityEndpoints connectivityEndpoints; - - /* - * Describes available applications and their endpoints on this - * ComputeInstance. - */ - @JsonProperty(value = "applications", access = JsonProperty.Access.WRITE_ONLY) - private List applications; - - /* - * Describes information on user who created this ComputeInstance. - */ - @JsonProperty(value = "createdBy", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceCreatedBy createdBy; - - /* - * Errors. Collection of errors encountered on this ComputeInstance. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The current state of this ComputeInstance. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceState state; - - /* - * Compute Instance Authorization type. The Compute Instance Authorization - * type. Available values are personal (default). - */ - @JsonProperty(value = "computeInstanceAuthorizationType") - private ComputeInstanceAuthorizationType computeInstanceAuthorizationType; - - /* - * Settings for a personal compute instance. - */ - @JsonProperty(value = "personalComputeInstanceSettings") - private PersonalComputeInstanceSettings personalComputeInstanceSettings; - - /* - * Details of customized scripts to execute for setting up the cluster. - */ - @JsonProperty(value = "setupScripts") - private SetupScripts setupScripts; - - /* - * The last operation on ComputeInstance. - */ - @JsonProperty(value = "lastOperation", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceLastOperation lastOperation; - - /* - * The list of schedules to be applied on the computes. - */ - @JsonProperty(value = "schedules", access = JsonProperty.Access.WRITE_ONLY) - private ComputeSchedules schedules; - - /* - * Enable node public IP. 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. - */ - @JsonProperty(value = "enableNodePublicIp") - private Boolean enableNodePublicIp; - - /* - * Describes informations of containers on this ComputeInstance. - */ - @JsonProperty(value = "containers", access = JsonProperty.Access.WRITE_ONLY) - private List containers; - - /* - * Describes informations of dataDisks on this ComputeInstance. - */ - @JsonProperty(value = "dataDisks", access = JsonProperty.Access.WRITE_ONLY) - private List dataDisks; - - /* - * Describes informations of dataMounts on this ComputeInstance. - */ - @JsonProperty(value = "dataMounts", access = JsonProperty.Access.WRITE_ONLY) - private List dataMounts; - - /* - * ComputeInstance version. - */ - @JsonProperty(value = "versions", access = JsonProperty.Access.WRITE_ONLY) - private ComputeInstanceVersion versions; - - /** - * 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: 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. - * - * @return the applicationSharingPolicy value. - */ - public ApplicationSharingPolicy applicationSharingPolicy() { - return this.applicationSharingPolicy; - } - - /** - * Set the applicationSharingPolicy property: 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. - * - * @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 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: Errors. 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: Compute Instance Authorization type. The Compute Instance - * Authorization type. Available values are personal (default). - * - * @return the computeInstanceAuthorizationType value. - */ - public ComputeInstanceAuthorizationType computeInstanceAuthorizationType() { - return this.computeInstanceAuthorizationType; - } - - /** - * Set the computeInstanceAuthorizationType property: Compute Instance Authorization type. 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; - } - - /** - * Get the enableNodePublicIp property: Enable node public IP. 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 node public IP. 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 (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(); - } - } -} 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 b3c107babdb49..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties(top level) of ComputeInstance. */ -@Fluent -public class ComputeInstanceSchema { - /* - * Properties of ComputeInstance - */ - @JsonProperty(value = "properties") - private ComputeInstanceProperties properties; - - /** - * 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(); - } - } -} 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 1ccf20d6d7f14..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.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.fasterxml.jackson.annotation.JsonProperty; - -/** Specifies policy and settings for SSH access. */ -@Fluent -public final class ComputeInstanceSshSettings { - /* - * 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. - */ - @JsonProperty(value = "sshPublicAccess") - private SshPublicAccess sshPublicAccess; - - /* - * Describes the admin user name. - */ - @JsonProperty(value = "adminUserName", access = JsonProperty.Access.WRITE_ONLY) - private String adminUsername; - - /* - * Describes the port for connecting through SSH. - */ - @JsonProperty(value = "sshPort", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "adminPublicKey") - private String adminPublicKey; - - /** - * Get the sshPublicAccess property: 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. - * - * @return the sshPublicAccess value. - */ - public SshPublicAccess sshPublicAccess() { - return this.sshPublicAccess; - } - - /** - * Set the sshPublicAccess property: 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. - * - * @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() { - } -} 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 7f6ead9833045..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeInstanceState. */ -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 or finds a ComputeInstanceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceState. - */ - @JsonCreator - 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 4541e9393c23a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Version of computeInstance. */ -@Fluent -public final class ComputeInstanceVersion { - /* - * Runtime of compute instance. - */ - @JsonProperty(value = "runtime") - private String runtime; - - /** - * 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() { - } -} 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 9a604c36dc445..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputePowerAction. */ -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 or finds a ComputePowerAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputePowerAction. - */ - @JsonCreator - 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/ComputeResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java deleted file mode 100644 index f83d48f467a04..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResource.java +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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). - * - * @throws com.azure.core.management.exception.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(); - - /** - * 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); - - /** - * 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 8179eb1656350..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ComputeResourceSchema model. */ -@Fluent -public class ComputeResourceSchema { - /* - * Compute properties - */ - @JsonProperty(value = "properties") - private Compute properties; - - /** - * 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(); - } - } -} 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 957090e82390c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The list of schedules to be applied on the computes. */ -@Fluent -public final class ComputeSchedules { - /* - * The list of compute start stop schedules to be applied. - */ - @JsonProperty(value = "computeStartStop") - private List computeStartStop; - - /** - * 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()); - } - } -} 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 ab0429a6d9da3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSecrets.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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 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 a0e3d4b8ecec6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.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.fasterxml.jackson.annotation.JsonProperty; - -/** Compute start stop schedule properties. */ -@Fluent -public final class ComputeStartStopSchedule { - /* - * Schedule id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The current deployment state of schedule. - */ - @JsonProperty(value = "provisioningStatus", access = JsonProperty.Access.WRITE_ONLY) - private ProvisioningStatus provisioningStatus; - - /* - * The compute power action. - */ - @JsonProperty(value = "action") - private ComputePowerAction action; - - /* - * Base definition of a schedule - */ - @JsonProperty(value = "schedule") - private ScheduleBase schedule; - - /** - * Get the id property: Schedule id. - * - * @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 action property: The compute power action. - * - * @return the action value. - */ - public ComputePowerAction action() { - return this.action; - } - - /** - * Set the action property: 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 schedule property: Base definition of a schedule. - * - * @return the schedule value. - */ - public ScheduleBase schedule() { - return this.schedule; - } - - /** - * Set the schedule property: Base definition of a schedule. - * - * @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 (schedule() != null) { - schedule().validate(); - } - } -} 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 cdf3665c5a016..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ComputeType. */ -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 or finds a ComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeType. - */ - @JsonCreator - 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/Computes.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java deleted file mode 100644 index 2da58eeb2d7ab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Computes.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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); - - /** - * 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); - - /** - * 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/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java deleted file mode 100644 index 1229c8deac105..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Resource requirements for each container instance within an online deployment. */ -@Fluent -public final class ContainerResourceRequirements { - /* - * Container resource limit info: - */ - @JsonProperty(value = "containerResourceLimits") - private ContainerResourceSettings containerResourceLimits; - - /* - * Container resource request info: - */ - @JsonProperty(value = "containerResourceRequests") - private ContainerResourceSettings containerResourceRequests; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerResourceLimits() != null) { - containerResourceLimits().validate(); - } - if (containerResourceRequests() != null) { - containerResourceRequests().validate(); - } - } -} 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 a4d57c97d647c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ContainerResourceSettings model. */ -@Fluent -public final class ContainerResourceSettings { - /* - * Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "cpu") - private String cpu; - - /* - * Number of Nvidia GPU cards request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "gpu") - private String gpu; - - /* - * Memory size request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ - */ - @JsonProperty(value = "memory") - private String memory; - - /** - * 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 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 611b454eb6a41..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a ContainerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerType. - */ - @JsonCreator - 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/CosmosDbSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.java deleted file mode 100644 index c62c842c2b158..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The CosmosDbSettings model. */ -@Fluent -public final class CosmosDbSettings { - /* - * The throughput of the collections in cosmosdb database - */ - @JsonProperty(value = "collectionsThroughput") - private Integer collectionsThroughput; - - /** - * 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() { - } -} 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 ce6c8889b3fd4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for CredentialsType. */ -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"); - - /** Static value KerberosKeytab for CredentialsType. */ - public static final CredentialsType KERBEROS_KEYTAB = fromString("KerberosKeytab"); - - /** Static value KerberosPassword for CredentialsType. */ - public static final CredentialsType KERBEROS_PASSWORD = fromString("KerberosPassword"); - - /** - * Creates or finds a CredentialsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CredentialsType. - */ - @JsonCreator - 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/CronSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronSchedule.java deleted file mode 100644 index 71922cf32584b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronSchedule.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Cron schedule definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scheduleType") -@JsonTypeName("Cron") -@Fluent -public final class CronSchedule extends ScheduleBase { - /* - * [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - */ - @JsonProperty(value = "expression", required = true) - private String expression; - - /** - * 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 CronSchedule object itself. - */ - public CronSchedule withExpression(String expression) { - this.expression = expression; - return this; - } - - /** {@inheritDoc} */ - @Override - public CronSchedule withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronSchedule withScheduleStatus(ScheduleStatus scheduleStatus) { - super.withScheduleStatus(scheduleStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronSchedule withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronSchedule 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property expression in model CronSchedule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CronSchedule.class); -} 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 9ce0dc4eed472..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The desired maximum forecast horizon in units of time-series frequency. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Custom") -@Fluent -public final class CustomForecastHorizon extends ForecastHorizon { - /* - * [Required] Forecast horizon value. - */ - @JsonProperty(value = "value", required = true) - private int value; - - /** - * 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(); - } -} 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 d943e49597247..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The CustomModelJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("CustomModel") -@Fluent -public final class CustomModelJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model CustomModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomModelJobInput.class); -} 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 5e595b21bd151..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The CustomModelJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("CustomModel") -@Fluent -public final class CustomModelJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 047df7e240d02..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** N-Cross validations are specified by user. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Custom") -@Fluent -public final class CustomNCrossValidations extends NCrossValidations { - /* - * [Required] N-Cross validations value. - */ - @JsonProperty(value = "value", required = true) - private int value; - - /** - * 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(); - } -} 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 821cad528057e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The CustomSeasonality model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Custom") -@Fluent -public final class CustomSeasonality extends Seasonality { - /* - * [Required] Seasonality value. - */ - @JsonProperty(value = "value", required = true) - private int value; - - /** - * 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(); - } -} 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 91639619b4d58..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** The CustomTargetLags model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Custom") -@Fluent -public final class CustomTargetLags extends TargetLags { - /* - * [Required] Set target lags values. - */ - @JsonProperty(value = "values", required = true) - private List values; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property values in model CustomTargetLags")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomTargetLags.class); -} 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 d2b709e271c75..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The CustomTargetRollingWindowSize model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "mode") -@JsonTypeName("Custom") -@Fluent -public final class CustomTargetRollingWindowSize extends TargetRollingWindowSize { - /* - * [Required] TargetRollingWindowSize value. - */ - @JsonProperty(value = "value", required = true) - private int value; - - /** - * 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(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.java deleted file mode 100644 index cccbc3bab2b93..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; - -/** An immutable client-side representation of DataContainerData. */ -public interface DataContainerData { - /** - * 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. - */ - DataContainerDetails 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.DataContainerDataInner object. - * - * @return the inner object. - */ - DataContainerDataInner innerModel(); - - /** The entirety of the DataContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The DataContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the DataContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DataContainerData 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 DataContainerData 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(DataContainerDetails properties); - } - /** - * The stage of the DataContainerData 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. - */ - DataContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataContainerData create(Context context); - } - } - /** - * Begins update for the DataContainerData resource. - * - * @return the stage of resource update. - */ - DataContainerData.Update update(); - - /** The template for DataContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataContainerData apply(Context context); - } - /** The DataContainerData update stages. */ - interface UpdateStages { - /** The stage of the DataContainerData 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(DataContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.java deleted file mode 100644 index ec67bda20e92c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerDetails.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Container for data asset versions. */ -@Fluent -public final class DataContainerDetails extends AssetContainer { - /* - * [Required] Specifies the type of data. - */ - @JsonProperty(value = "dataType", required = true) - private DataType dataType; - - /** - * 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 DataContainerDetails object itself. - */ - public DataContainerDetails withDataType(DataType dataType) { - this.dataType = dataType; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerDetails 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 (dataType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataType in model DataContainerDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerDetails.class); -} 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 f61ab9b1c0206..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of DataContainer entities. */ -@Fluent -public final class DataContainerResourceArmPaginatedResult { - /* - * The link to the next page of DataContainer objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type DataContainer. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 78b930a342288..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainers.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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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. - */ - DataContainerData get(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 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}. - */ - DataContainerData 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 DataContainerData resource. - * - * @param name resource name. - * @return the first stage of the new DataContainerData definition. - */ - DataContainerData.DefinitionStages.Blank define(String name); -} 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 77a8fb84a8878..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataFactory compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("DataFactory") -@Fluent -public final class DataFactory extends Compute { - /** {@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(); - } -} 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 3d264fc82edda..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataLakeAnalytics compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("DataLakeAnalytics") -@Fluent -public final class DataLakeAnalytics extends Compute { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private DataLakeAnalyticsSchemaProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 e8645412a72d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DataLakeAnalyticsSchema model. */ -@Fluent -public class DataLakeAnalyticsSchema { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private DataLakeAnalyticsSchemaProperties properties; - - /** - * 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(); - } - } -} 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 101006cd02e77..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DataLakeAnalyticsSchemaProperties model. */ -@Fluent -public final class DataLakeAnalyticsSchemaProperties { - /* - * DataLake Store Account Name - */ - @JsonProperty(value = "dataLakeStoreAccountName") - private String dataLakeStoreAccountName; - - /** - * 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() { - } -} 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 a107820dcd14c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a datastore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("DataPath") -@Fluent -public final class DataPathAssetReference extends AssetReferenceBase { - /* - * ARM resource ID of the datastore where the asset is located. - */ - @JsonProperty(value = "datastoreId") - private String datastoreId; - - /* - * The path of the file/directory in the datastore. - */ - @JsonProperty(value = "path") - private String path; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.java deleted file mode 100644 index b22637a92e9fc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Collection of registered Tabular Dataset Ids and other data settings required for training and validating models. */ -@Fluent -public class DataSettings { - /* - * [Required] Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - */ - @JsonProperty(value = "targetColumnName", required = true) - private String targetColumnName; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private TestDataSettings testData; - - /* - * [Required] Training data input. - */ - @JsonProperty(value = "trainingData", required = true) - private TrainingDataSettings trainingData; - - /** - * Get the targetColumnName property: [Required] 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: [Required] 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 DataSettings object itself. - */ - public DataSettings withTargetColumnName(String targetColumnName) { - this.targetColumnName = targetColumnName; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public TestDataSettings testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the DataSettings object itself. - */ - public DataSettings withTestData(TestDataSettings testData) { - this.testData = testData; - return this; - } - - /** - * Get the trainingData property: [Required] Training data input. - * - * @return the trainingData value. - */ - public TrainingDataSettings trainingData() { - return this.trainingData; - } - - /** - * Set the trainingData property: [Required] Training data input. - * - * @param trainingData the trainingData value to set. - * @return the DataSettings object itself. - */ - public DataSettings withTrainingData(TrainingDataSettings trainingData) { - this.trainingData = trainingData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetColumnName() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property targetColumnName in model DataSettings")); - } - if (testData() != null) { - testData().validate(); - } - if (trainingData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trainingData in model DataSettings")); - } else { - trainingData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataSettings.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 cfa71f5d77772..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataType. */ -public final class DataType extends ExpandableStringEnum { - /** Static value UriFile for DataType. */ - public static final DataType URI_FILE = fromString("UriFile"); - - /** Static value UriFolder for DataType. */ - public static final DataType URI_FOLDER = fromString("UriFolder"); - - /** Static value MLTable for DataType. */ - public static final DataType MLTABLE = fromString("MLTable"); - - /** - * Creates or finds a DataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataType. - */ - @JsonCreator - 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/DataVersionBaseData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseData.java deleted file mode 100644 index a3b595ae33fe1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; - -/** An immutable client-side representation of DataVersionBaseData. */ -public interface DataVersionBaseData { - /** - * 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. - */ - DataVersionBaseDetails 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.DataVersionBaseDataInner object. - * - * @return the inner object. - */ - DataVersionBaseDataInner innerModel(); - - /** The entirety of the DataVersionBaseData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The DataVersionBaseData definition stages. */ - interface DefinitionStages { - /** The first stage of the DataVersionBaseData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DataVersionBaseData 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 DataVersionBaseData 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(DataVersionBaseDetails properties); - } - /** - * The stage of the DataVersionBaseData 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. - */ - DataVersionBaseData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataVersionBaseData create(Context context); - } - } - /** - * Begins update for the DataVersionBaseData resource. - * - * @return the stage of resource update. - */ - DataVersionBaseData.Update update(); - - /** The template for DataVersionBaseData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataVersionBaseData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataVersionBaseData apply(Context context); - } - /** The DataVersionBaseData update stages. */ - interface UpdateStages { - /** The stage of the DataVersionBaseData 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(DataVersionBaseDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataVersionBaseData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataVersionBaseData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.java deleted file mode 100644 index ecf45ae7a65d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseDetails.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Data version base definition. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "dataType", - defaultImpl = DataVersionBaseDetails.class) -@JsonTypeName("DataVersionBaseDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MLTable", value = MLTableData.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileDataVersion.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderDataVersion.class) -}) -@Fluent -public class DataVersionBaseDetails extends AssetBase { - /* - * [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType - */ - @JsonProperty(value = "dataUri", required = true) - private String dataUri; - - /** - * Get the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. - * - * @return the dataUri value. - */ - public String dataUri() { - return this.dataUri; - } - - /** - * Set the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20220201Preview.Assets.DataVersionBase.DataType. - * - * @param dataUri the dataUri value to set. - * @return the DataVersionBaseDetails object itself. - */ - public DataVersionBaseDetails withDataUri(String dataUri) { - this.dataUri = dataUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseDetails withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseDetails 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 (dataUri() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataUri in model DataVersionBaseDetails")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseDetails.class); -} 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 ad68313cd5715..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of DataVersionBase entities. */ -@Fluent -public final class DataVersionBaseResourceArmPaginatedResult { - /* - * The link to the next page of DataVersionBase objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type DataVersionBase. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 11e5787a3ee08..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersions.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @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); - - /** - * 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. - */ - DataVersionBaseData get(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 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}. - */ - DataVersionBaseData 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 DataVersionBaseData resource. - * - * @param name resource name. - * @return the first stage of the new DataVersionBaseData definition. - */ - DataVersionBaseData.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 a05b3ec1bc0d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A DataFactory compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("Databricks") -@Fluent -public final class Databricks extends Compute { - /* - * Properties of Databricks - */ - @JsonProperty(value = "properties") - private DatabricksProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 065d8833f10b4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on Databricks. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("Databricks") -@Fluent -public final class DatabricksComputeSecrets extends ComputeSecretsInner { - /* - * access token for databricks account. - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /** - * 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(); - } -} 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 b5246b28d347f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of Databricks Compute Secrets. */ -@Fluent -public class DatabricksComputeSecretsProperties { - /* - * access token for databricks account. - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /** - * 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() { - } -} 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 94ba35df77d4a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of Databricks. */ -@Fluent -public final class DatabricksProperties { - /* - * Databricks access token - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /* - * Workspace Url - */ - @JsonProperty(value = "workspaceUrl") - private String workspaceUrl; - - /** - * 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() { - } -} 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 6bbbe79737912..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DatabricksSchema model. */ -@Fluent -public class DatabricksSchema { - /* - * Properties of Databricks - */ - @JsonProperty(value = "properties") - private DatabricksProperties properties; - - /** - * 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(); - } - } -} 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 98423ce9668db..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for datastore credentials. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "credentialsType", - defaultImpl = DatastoreCredentials.class) -@JsonTypeName("DatastoreCredentials") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AccountKey", value = AccountKeyDatastoreCredentials.class), - @JsonSubTypes.Type(name = "Certificate", value = CertificateDatastoreCredentials.class), - @JsonSubTypes.Type(name = "KerberosKeytab", value = KerberosKeytabCredentials.class), - @JsonSubTypes.Type(name = "KerberosPassword", value = KerberosPasswordCredentials.class), - @JsonSubTypes.Type(name = "None", value = NoneDatastoreCredentials.class), - @JsonSubTypes.Type(name = "Sas", value = SasDatastoreCredentials.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreCredentials.class) -}) -@Immutable -public class DatastoreCredentials { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreData.java deleted file mode 100644 index 9fe35264387e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreData.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.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; - -/** An immutable client-side representation of DatastoreData. */ -public interface DatastoreData { - /** - * 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. - */ - DatastoreDetails 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.DatastoreDataInner object. - * - * @return the inner object. - */ - DatastoreDataInner innerModel(); - - /** The entirety of the DatastoreData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The DatastoreData definition stages. */ - interface DefinitionStages { - /** The first stage of the DatastoreData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DatastoreData 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 DatastoreData 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(DatastoreDetails properties); - } - /** - * The stage of the DatastoreData 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. - */ - DatastoreData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DatastoreData create(Context context); - } - /** The stage of the DatastoreData 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 DatastoreData resource. - * - * @return the stage of resource update. - */ - DatastoreData.Update update(); - - /** The template for DatastoreData update. */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DatastoreData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DatastoreData apply(Context context); - } - /** The DatastoreData update stages. */ - interface UpdateStages { - /** The stage of the DatastoreData 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(DatastoreDetails properties); - } - /** The stage of the DatastoreData 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. - */ - DatastoreData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DatastoreData refresh(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(); - - /** - * 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); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.java deleted file mode 100644 index efe01d39f09e8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreDetails.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Base definition for datastore contents configuration. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "datastoreType", - defaultImpl = DatastoreDetails.class) -@JsonTypeName("DatastoreDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AzureBlob", value = AzureBlobDatastore.class), - @JsonSubTypes.Type(name = "AzureDataLakeGen1", value = AzureDataLakeGen1Datastore.class), - @JsonSubTypes.Type(name = "AzureDataLakeGen2", value = AzureDataLakeGen2Datastore.class), - @JsonSubTypes.Type(name = "AzureFile", value = AzureFileDatastore.class), - @JsonSubTypes.Type(name = "Hdfs", value = HdfsDatastore.class) -}) -@Fluent -public class DatastoreDetails extends ResourceBase { - /* - * [Required] Account credentials. - */ - @JsonProperty(value = "credentials", required = true) - private DatastoreCredentials credentials; - - /* - * Readonly property to indicate if datastore is the workspace default - * datastore - */ - @JsonProperty(value = "isDefault", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDefault; - - /** - * 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 DatastoreDetails object itself. - */ - public DatastoreDetails withCredentials(DatastoreCredentials credentials) { - this.credentials = credentials; - return this; - } - - /** - * 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; - } - - /** {@inheritDoc} */ - @Override - public DatastoreDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DatastoreDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DatastoreDetails 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 (credentials() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property credentials in model DatastoreDetails")); - } else { - credentials().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreDetails.class); -} 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 b65e174ffbc8b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of Datastore entities. */ -@Fluent -public final class DatastoreResourceArmPaginatedResult { - /* - * The link to the next page of Datastore objects. If null, there are no - * additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type Datastore. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 67b7f3d7b5483..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreSecrets.java +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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 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 305447f2d0652..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DatastoreType. */ -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 Hdfs for DatastoreType. */ - public static final DatastoreType HDFS = fromString("Hdfs"); - - /** - * Creates or finds a DatastoreType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatastoreType. - */ - @JsonCreator - 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 807e16e260f9b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 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); - - /** - * 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. - */ - DatastoreData get(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 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 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. - * - * @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}. - */ - DatastoreData 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 DatastoreData resource. - * - * @param name resource name. - * @return the first stage of the new DatastoreData definition. - */ - DatastoreData.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 c4bc75c6bc656..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The DefaultScaleSettings model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") -@JsonTypeName("Default") -@Immutable -public final class DefaultScaleSettings extends OnlineScaleSettings { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 a16cf2ec0073d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogs.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.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 8987ef7af753e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The DeploymentLogsRequest model. */ -@Fluent -public final class DeploymentLogsRequest { - /* - * The type of container to retrieve logs from. - */ - @JsonProperty(value = "containerType") - private ContainerType containerType; - - /* - * The maximum number of lines to tail. - */ - @JsonProperty(value = "tail") - private Integer tail; - - /** - * 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() { - } -} 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 be24d57dd7c1d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines 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 or finds a DeploymentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentProvisioningState. - */ - @JsonCreator - 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/DiagnoseRequestProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java deleted file mode 100644 index a2e2d791b641a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The DiagnoseRequestProperties model. */ -@Fluent -public final class DiagnoseRequestProperties { - /* - * Setting for diagnosing user defined routing - */ - @JsonProperty(value = "udr") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map udr; - - /* - * Setting for diagnosing network security group - */ - @JsonProperty(value = "nsg") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map nsg; - - /* - * Setting for diagnosing resource lock - */ - @JsonProperty(value = "resourceLock") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map resourceLock; - - /* - * Setting for diagnosing dns resolution - */ - @JsonProperty(value = "dnsResolution") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map dnsResolution; - - /* - * Setting for diagnosing dependent storage account - */ - @JsonProperty(value = "storageAccount") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map storageAccount; - - /* - * Setting for diagnosing dependent key vault - */ - @JsonProperty(value = "keyVault") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map keyVault; - - /* - * Setting for diagnosing dependent container registry - */ - @JsonProperty(value = "containerRegistry") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map containerRegistry; - - /* - * Setting for diagnosing dependent application insights - */ - @JsonProperty(value = "applicationInsights") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map applicationInsights; - - /* - * Setting for diagnosing unclassified category of problems - */ - @JsonProperty(value = "others") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map others; - - /** - * 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() { - } -} 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 403b22180639f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResult.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.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 fc5ac24405238..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The DiagnoseResponseResultValue model. */ -@Fluent -public final class DiagnoseResponseResultValue { - /* - * The userDefinedRouteResults property. - */ - @JsonProperty(value = "userDefinedRouteResults") - private List userDefinedRouteResults; - - /* - * The networkSecurityRuleResults property. - */ - @JsonProperty(value = "networkSecurityRuleResults") - private List networkSecurityRuleResults; - - /* - * The resourceLockResults property. - */ - @JsonProperty(value = "resourceLockResults") - private List resourceLockResults; - - /* - * The dnsResolutionResults property. - */ - @JsonProperty(value = "dnsResolutionResults") - private List dnsResolutionResults; - - /* - * The storageAccountResults property. - */ - @JsonProperty(value = "storageAccountResults") - private List storageAccountResults; - - /* - * The keyVaultResults property. - */ - @JsonProperty(value = "keyVaultResults") - private List keyVaultResults; - - /* - * The containerRegistryResults property. - */ - @JsonProperty(value = "containerRegistryResults") - private List containerRegistryResults; - - /* - * The applicationInsightsResults property. - */ - @JsonProperty(value = "applicationInsightsResults") - private List applicationInsightsResults; - - /* - * The otherResults property. - */ - @JsonProperty(value = "otherResults") - private List otherResults; - - /** - * 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()); - } - } -} 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 0014136f6e157..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Result of Diagnose. */ -@Immutable -public final class DiagnoseResult { - /* - * Code for workspace setup error - */ - @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) - private String code; - - /* - * Level of workspace setup error - */ - @JsonProperty(value = "level", access = JsonProperty.Access.WRITE_ONLY) - private DiagnoseResultLevel level; - - /* - * Message of workspace setup error - */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) - private String message; - - /** - * 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() { - } -} 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 50bf327ad003e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DiagnoseResultLevel. */ -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 or finds a DiagnoseResultLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiagnoseResultLevel. - */ - @JsonCreator - 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 837627bed5364..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Parameters to diagnose a workspace. */ -@Fluent -public final class DiagnoseWorkspaceParameters { - /* - * Value of Parameters - */ - @JsonProperty(value = "value") - private DiagnoseRequestProperties value; - - /** - * 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(); - } - } -} 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 258d1a16db265..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for job distribution configuration. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "distributionType", - defaultImpl = DistributionConfiguration.class) -@JsonTypeName("DistributionConfiguration") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Mpi", value = Mpi.class), - @JsonSubTypes.Type(name = "PyTorch", value = PyTorch.class), - @JsonSubTypes.Type(name = "TensorFlow", value = TensorFlow.class) -}) -@Immutable -public class DistributionConfiguration { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 3a3884ec9af50..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DistributionType. */ -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 or finds a DistributionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DistributionType. - */ - @JsonCreator - 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/EarlyTerminationPolicy.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java deleted file mode 100644 index faee0ea567248..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Early termination policies enable canceling poor-performing runs before they complete. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "policyType", - defaultImpl = EarlyTerminationPolicy.class) -@JsonTypeName("EarlyTerminationPolicy") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Bandit", value = BanditPolicy.class), - @JsonSubTypes.Type(name = "MedianStopping", value = MedianStoppingPolicy.class), - @JsonSubTypes.Type(name = "TruncationSelection", value = TruncationSelectionPolicy.class) -}) -@Fluent -public class EarlyTerminationPolicy { - /* - * Number of intervals by which to delay the first evaluation. - */ - @JsonProperty(value = "delayEvaluation") - private Integer delayEvaluation; - - /* - * Interval (number of runs) between policy evaluations. - */ - @JsonProperty(value = "evaluationInterval") - private Integer evaluationInterval; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 e32fe129e79a8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a EarlyTerminationPolicyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EarlyTerminationPolicyType. - */ - @JsonCreator - 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 981312781c628..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EgressPublicNetworkAccessType. */ -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 or finds a EgressPublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EgressPublicNetworkAccessType. - */ - @JsonCreator - 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/EncryptionKeyVaultProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.java deleted file mode 100644 index 3fc151caa45ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EncryptionKeyVaultProperties model. */ -@Fluent -public final class EncryptionKeyVaultProperties { - /* - * The ArmId of the keyVault where the customer owned encryption key is - * present. - */ - @JsonProperty(value = "keyVaultArmId", required = true) - private String keyVaultArmId; - - /* - * Key vault uri to access the encryption key. - */ - @JsonProperty(value = "keyIdentifier", required = true) - private String keyIdentifier; - - /* - * For future use - The client id of the identity which will be used to - * access key vault. - */ - @JsonProperty(value = "identityClientId") - private String identityClientId; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultArmId in model EncryptionKeyVaultProperties")); - } - if (keyIdentifier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyIdentifier in model EncryptionKeyVaultProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionKeyVaultProperties.class); -} 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 6ee9b191bbda8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The EncryptionProperty model. */ -@Fluent -public final class EncryptionProperty { - /* - * Indicates whether or not the encryption is enabled for the workspace. - */ - @JsonProperty(value = "status", required = true) - private EncryptionStatus status; - - /* - * The identity that will be used to access the key vault for encryption at - * rest. - */ - @JsonProperty(value = "identity") - private IdentityForCmk identity; - - /* - * Customer Key vault properties. - */ - @JsonProperty(value = "keyVaultProperties", required = true) - private EncryptionKeyVaultProperties keyVaultProperties; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property status in model EncryptionProperty")); - } - if (identity() != null) { - identity().validate(); - } - if (keyVaultProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyVaultProperties in model EncryptionProperty")); - } else { - keyVaultProperties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EncryptionProperty.class); -} 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 93a1b82a0ddc5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EncryptionStatus. */ -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 or finds a EncryptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionStatus. - */ - @JsonCreator - 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/EndpointAuthKeys.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.java deleted file mode 100644 index 0d6b4eba1bf55..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthKeys.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.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 99d8a3880ca97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EndpointAuthMode. */ -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 or finds a EndpointAuthMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointAuthMode. - */ - @JsonCreator - 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 327ea7b62a73a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthToken.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.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 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 tokenType property: Access token type. - * - * @return the tokenType value. - */ - String tokenType(); - - /** - * 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 4d8979f128b40..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EndpointComputeType. */ -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 or finds a EndpointComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointComputeType. - */ - @JsonCreator - 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 f547c746ef2ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Base definition for endpoint deployment. */ -@Fluent -public class EndpointDeploymentPropertiesBase { - /* - * Code configuration for the endpoint deployment. - */ - @JsonProperty(value = "codeConfiguration") - private CodeConfiguration codeConfiguration; - - /* - * Description of the endpoint deployment. - */ - @JsonProperty(value = "description") - private String description; - - /* - * ARM resource ID of the environment specification for the endpoint - * deployment. - */ - @JsonProperty(value = "environmentId") - private String environmentId; - - /* - * Environment variables configuration for the deployment. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * Property dictionary. Properties can be added, but not removed or - * altered. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /** - * 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 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 environmentId property: ARM resource ID 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 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (codeConfiguration() != null) { - codeConfiguration().validate(); - } - } -} 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 0251403b9fe8e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointPropertiesBase.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.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import java.util.Map; - -/** An immutable client-side representation of EndpointPropertiesBase. */ -public interface EndpointPropertiesBase { - /** - * 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 description property: Description of the inference endpoint. - * - * @return the description value. - */ - String description(); - - /** - * 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 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 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 81563056ba0f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EndpointProvisioningState. */ -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 or finds a EndpointProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointProvisioningState. - */ - @JsonCreator - 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/EnvironmentContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.java deleted file mode 100644 index a197e16654b85..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; - -/** An immutable client-side representation of EnvironmentContainerData. */ -public interface EnvironmentContainerData { - /** - * 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. - */ - EnvironmentContainerDetails 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.EnvironmentContainerDataInner object. - * - * @return the inner object. - */ - EnvironmentContainerDataInner innerModel(); - - /** The entirety of the EnvironmentContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The EnvironmentContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the EnvironmentContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the EnvironmentContainerData 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 EnvironmentContainerData 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(EnvironmentContainerDetails properties); - } - /** - * The stage of the EnvironmentContainerData 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. - */ - EnvironmentContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentContainerData create(Context context); - } - } - /** - * Begins update for the EnvironmentContainerData resource. - * - * @return the stage of resource update. - */ - EnvironmentContainerData.Update update(); - - /** The template for EnvironmentContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentContainerData apply(Context context); - } - /** The EnvironmentContainerData update stages. */ - interface UpdateStages { - /** The stage of the EnvironmentContainerData 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(EnvironmentContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.java deleted file mode 100644 index fe093805a4b8e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerDetails.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.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** Container for environment specification versions. */ -@Fluent -public final class EnvironmentContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerDetails 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(); - } -} 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 e092db27c6b00..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of EnvironmentContainer entities. */ -@Fluent -public final class EnvironmentContainerResourceArmPaginatedResult { - /* - * The link to the next page of EnvironmentContainer objects. If null, - * there are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type EnvironmentContainer. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 1ff0f06b34e2a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainers.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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - Response deleteWithResponse(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. - */ - EnvironmentContainerData get(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 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}. - */ - EnvironmentContainerData 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 EnvironmentContainerData resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentContainerData definition. - */ - EnvironmentContainerData.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 ffcc56a826582..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for EnvironmentType. */ -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 or finds a EnvironmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentType. - */ - @JsonCreator - 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/EnvironmentVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionData.java deleted file mode 100644 index 088be7f710eff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; - -/** An immutable client-side representation of EnvironmentVersionData. */ -public interface EnvironmentVersionData { - /** - * 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. - */ - EnvironmentVersionDetails 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.EnvironmentVersionDataInner object. - * - * @return the inner object. - */ - EnvironmentVersionDataInner innerModel(); - - /** The entirety of the EnvironmentVersionData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The EnvironmentVersionData definition stages. */ - interface DefinitionStages { - /** The first stage of the EnvironmentVersionData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the EnvironmentVersionData 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 EnvironmentVersionData 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(EnvironmentVersionDetails properties); - } - /** - * The stage of the EnvironmentVersionData 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. - */ - EnvironmentVersionData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentVersionData create(Context context); - } - } - /** - * Begins update for the EnvironmentVersionData resource. - * - * @return the stage of resource update. - */ - EnvironmentVersionData.Update update(); - - /** The template for EnvironmentVersionData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentVersionData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentVersionData apply(Context context); - } - /** The EnvironmentVersionData update stages. */ - interface UpdateStages { - /** The stage of the EnvironmentVersionData 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(EnvironmentVersionDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentVersionData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentVersionData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.java deleted file mode 100644 index 3609c2a645761..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionDetails.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Environment version details. */ -@Fluent -public final class EnvironmentVersionDetails extends AssetBase { - /* - * Configuration settings for Docker build context. - */ - @JsonProperty(value = "build") - private BuildContext build; - - /* - * Standard configuration file used by Conda that lets you install any kind - * of package, including Python, R, and C/C++ packages. - * - */ - @JsonProperty(value = "condaFile") - private String condaFile; - - /* - * Environment type is either user managed or curated by the Azure ML - * service - * - */ - @JsonProperty(value = "environmentType", access = JsonProperty.Access.WRITE_ONLY) - private EnvironmentType environmentType; - - /* - * Name of the image that will be used for the environment. - * - */ - @JsonProperty(value = "image") - private String image; - - /* - * Defines configuration specific to inference. - */ - @JsonProperty(value = "inferenceConfig") - private InferenceContainerProperties inferenceConfig; - - /* - * The OS type of the environment. - */ - @JsonProperty(value = "osType") - private OperatingSystemType osType; - - /** - * 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 EnvironmentVersionDetails object itself. - */ - public EnvironmentVersionDetails withBuild(BuildContext build) { - this.build = build; - 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 EnvironmentVersionDetails object itself. - */ - public EnvironmentVersionDetails withCondaFile(String condaFile) { - this.condaFile = condaFile; - return this; - } - - /** - * 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 EnvironmentVersionDetails object itself. - */ - public EnvironmentVersionDetails withImage(String image) { - this.image = image; - 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 EnvironmentVersionDetails object itself. - */ - public EnvironmentVersionDetails withInferenceConfig(InferenceContainerProperties inferenceConfig) { - this.inferenceConfig = inferenceConfig; - 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 EnvironmentVersionDetails object itself. - */ - public EnvironmentVersionDetails withOsType(OperatingSystemType osType) { - this.osType = osType; - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionDetails withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionDetails 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 (build() != null) { - build().validate(); - } - if (inferenceConfig() != null) { - inferenceConfig().validate(); - } - } -} 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 1423e6bfe747f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of EnvironmentVersion entities. */ -@Fluent -public final class EnvironmentVersionResourceArmPaginatedResult { - /* - * The link to the next page of EnvironmentVersion objects. If null, there - * are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type EnvironmentVersion. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 e35c0d05eb3a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersions.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - Response deleteWithResponse( - 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. - */ - EnvironmentVersionData get(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 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}. - */ - EnvironmentVersionData 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 EnvironmentVersionData resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersionData definition. - */ - EnvironmentVersionData.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 d6d2ed9180c3c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The estimated price info for using a VM of a particular OS type, tier, etc. */ -@Fluent -public final class EstimatedVMPrice { - /* - * Retail price The price charged for using the VM. - */ - @JsonProperty(value = "retailPrice", required = true) - private double retailPrice; - - /* - * OS type Operating system type used by the VM. - */ - @JsonProperty(value = "osType", required = true) - private VMPriceOSType osType; - - /* - * VM tier The type of the VM. - */ - @JsonProperty(value = "vmTier", required = true) - private VMTier vmTier; - - /** - * Get the retailPrice property: Retail price The price charged for using the VM. - * - * @return the retailPrice value. - */ - public double retailPrice() { - return this.retailPrice; - } - - /** - * Set the retailPrice property: Retail price 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: OS type Operating system type used by the VM. - * - * @return the osType value. - */ - public VMPriceOSType osType() { - return this.osType; - } - - /** - * Set the osType property: OS type 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: VM tier The type of the VM. - * - * @return the vmTier value. - */ - public VMTier vmTier() { - return this.vmTier; - } - - /** - * Set the vmTier property: VM tier 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property osType in model EstimatedVMPrice")); - } - if (vmTier() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property vmTier in model EstimatedVMPrice")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EstimatedVMPrice.class); -} 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 d56a96c2434bb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The estimated price info for using a VM. */ -@Fluent -public final class EstimatedVMPrices { - /* - * Billing currency Three lettered code specifying the currency of the VM - * price. Example: USD - */ - @JsonProperty(value = "billingCurrency", required = true) - private BillingCurrency billingCurrency; - - /* - * Unit of time measure The unit of time measurement for the specified VM - * price. Example: OneHour - */ - @JsonProperty(value = "unitOfMeasure", required = true) - private UnitOfMeasure unitOfMeasure; - - /* - * List of estimated VM prices. The list of estimated prices for using a VM - * of a particular OS type, tier, etc. - */ - @JsonProperty(value = "values", required = true) - private List values; - - /** - * Get the billingCurrency property: Billing currency 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: Billing currency 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: Unit of time measure 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: Unit of time measure 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: List of estimated VM prices. 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: List of estimated VM prices. 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property billingCurrency in model EstimatedVMPrices")); - } - if (unitOfMeasure() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property unitOfMeasure in model EstimatedVMPrices")); - } - if (values() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property values in model EstimatedVMPrices")); - } else { - values().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EstimatedVMPrices.class); -} 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 6483d490175f8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ExternalFqdnResponse.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.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/FeatureLags.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.java deleted file mode 100644 index e8ef06a0db5c0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FeatureLags. */ -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 or finds a FeatureLags from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureLags. - */ - @JsonCreator - 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/FeaturizationMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.java deleted file mode 100644 index d59613475859c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FeaturizationMode. */ -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 or finds a FeaturizationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeaturizationMode. - */ - @JsonCreator - 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 d56b97221980c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Featurization Configuration. */ -@Fluent -public class FeaturizationSettings { - /* - * Dataset language, useful for the text data. - */ - @JsonProperty(value = "datasetLanguage") - private String datasetLanguage; - - /** - * 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() { - } -} 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 497826d327353..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The FlavorData model. */ -@Fluent -public final class FlavorData { - /* - * Model flavor-specific data. - */ - @JsonProperty(value = "data") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map data; - - /** - * 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() { - } -} 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 c9b79c3e310b9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The desired maximum forecast horizon in units of time-series frequency. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "mode", - defaultImpl = ForecastHorizon.class) -@JsonTypeName("ForecastHorizon") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Auto", value = AutoForecastHorizon.class), - @JsonSubTypes.Type(name = "Custom", value = CustomForecastHorizon.class) -}) -@Immutable -public class ForecastHorizon { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 79a78c145fd5c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ForecastHorizonMode. */ -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 or finds a ForecastHorizonMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastHorizonMode. - */ - @JsonCreator - 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 6fb8de9dc3cdb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Forecasting task in AutoML Table vertical. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("Forecasting") -@Fluent -public final class Forecasting extends AutoMLVertical { - /* - * Allowed models for forecasting task. - */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for forecasting task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; - - /* - * Forecasting task specific inputs. - */ - @JsonProperty(value = "forecastingSettings") - private ForecastingSettings forecastingSettings; - - /* - * Primary metric for forecasting task. - */ - @JsonProperty(value = "primaryMetric") - private ForecastingPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; - - /** - * Get the allowedModels property: Allowed models for forecasting task. - * - * @return the allowedModels value. - */ - public List allowedModels() { - return this.allowedModels; - } - - /** - * Set the allowedModels property: Allowed models for forecasting task. - * - * @param allowedModels the allowedModels value to set. - * @return the Forecasting object itself. - */ - public Forecasting withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } - - /** - * Get the blockedModels property: Blocked models for forecasting task. - * - * @return the blockedModels value. - */ - public List blockedModels() { - return this.blockedModels; - } - - /** - * Set the blockedModels property: Blocked models for forecasting task. - * - * @param blockedModels the blockedModels value to set. - * @return the Forecasting object itself. - */ - public Forecasting withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - 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 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** - * 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 trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public TrainingSettings 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(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - 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 (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - } -} 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 6af7db8b880bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ForecastingModels. */ -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 or finds a ForecastingModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingModels. - */ - @JsonCreator - 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 d9e5cdc97ea55..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ForecastingPrimaryMetrics. */ -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 or finds a ForecastingPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingPrimaryMetrics. - */ - @JsonCreator - 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 69b4eac619021..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java +++ /dev/null @@ -1,414 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Forecasting specific parameters. */ -@Fluent -public final class ForecastingSettings { - /* - * Country or region for holidays for forecasting tasks. - * These should be ISO 3166 two-letter country/region codes, for example - * 'US' or 'GB'. - */ - @JsonProperty(value = "countryOrRegionForHolidays") - private String countryOrRegionForHolidays; - - /* - * 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. - */ - @JsonProperty(value = "cvStepSize") - private Integer cvStepSize; - - /* - * Flag for generating lags for the numeric features with 'auto' or null. - */ - @JsonProperty(value = "featureLags") - private FeatureLags featureLags; - - /* - * The desired maximum forecast horizon in units of time-series frequency. - */ - @JsonProperty(value = "forecastHorizon") - private ForecastHorizon forecastHorizon; - - /* - * 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. - */ - @JsonProperty(value = "frequency") - private String frequency; - - /* - * Set time series seasonality as an integer multiple of the series - * frequency. - * If seasonality is set to 'auto', it will be inferred. - */ - @JsonProperty(value = "seasonality") - private Seasonality seasonality; - - /* - * The parameter defining how if AutoML should handle short time series. - */ - @JsonProperty(value = "shortSeriesHandlingConfig") - private ShortSeriesHandlingConfiguration shortSeriesHandlingConfig; - - /* - * 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". - */ - @JsonProperty(value = "targetAggregateFunction") - private TargetAggregationFunction targetAggregateFunction; - - /* - * The number of past periods to lag from the target column. - */ - @JsonProperty(value = "targetLags") - private TargetLags targetLags; - - /* - * The number of past periods used to create a rolling window average of - * the target column. - */ - @JsonProperty(value = "targetRollingWindowSize") - private TargetRollingWindowSize targetRollingWindowSize; - - /* - * 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. - */ - @JsonProperty(value = "timeColumnName") - private String timeColumnName; - - /* - * 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. - */ - @JsonProperty(value = "timeSeriesIdColumnNames") - private List timeSeriesIdColumnNames; - - /* - * Configure STL Decomposition of the time-series target column. - */ - @JsonProperty(value = "useStl") - private UseStl useStl; - - /** - * 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 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; - } - - /** - * 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 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 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 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 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 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 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 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (forecastHorizon() != null) { - forecastHorizon().validate(); - } - if (seasonality() != null) { - seasonality().validate(); - } - if (targetLags() != null) { - targetLags().validate(); - } - if (targetRollingWindowSize() != null) { - targetRollingWindowSize().validate(); - } - } -} 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 ab45f4eb4647a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The FqdnEndpoint model. */ -@Fluent -public final class FqdnEndpoint { - /* - * The domainName property. - */ - @JsonProperty(value = "domainName") - private String domainName; - - /* - * The endpointDetails property. - */ - @JsonProperty(value = "endpointDetails") - private List endpointDetails; - - /** - * 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()); - } - } -} 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 b90c3a27e9488..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The FqdnEndpointDetail model. */ -@Fluent -public final class FqdnEndpointDetail { - /* - * The port property. - */ - @JsonProperty(value = "port") - private Integer port; - - /** - * 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() { - } -} 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 a1159f6b1d144..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The FqdnEndpoints model. */ -@Fluent -public final class FqdnEndpoints { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private FqdnEndpointsProperties properties; - - /** - * 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(); - } - } -} 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 5fa1056c3d8b0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The FqdnEndpointsProperties model. */ -@Fluent -public final class FqdnEndpointsProperties { - /* - * The category property. - */ - @JsonProperty(value = "category") - private String category; - - /* - * The endpoints property. - */ - @JsonProperty(value = "endpoints") - private List endpoints; - - /** - * 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()); - } - } -} 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 5506fa96adcf9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Goal. */ -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 or finds a Goal from its string representation. - * - * @param name a name to look for. - * @return the corresponding Goal. - */ - @JsonCreator - 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 95ed2225a6cad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines a Sampling Algorithm that exhaustively generates every value combination in the space. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") -@JsonTypeName("Grid") -@Immutable -public final class GridSamplingAlgorithm extends SamplingAlgorithm { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 43bca53088eae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A HDInsight compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("HDInsight") -@Fluent -public final class HDInsight extends Compute { - /* - * HDInsight compute properties - */ - @JsonProperty(value = "properties") - private HDInsightProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 9ec6e52adfac6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.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.fasterxml.jackson.annotation.JsonProperty; - -/** HDInsight compute properties. */ -@Fluent -public final class HDInsightProperties { - /* - * Port open for ssh connections on the master node of the cluster. - */ - @JsonProperty(value = "sshPort") - private Integer sshPort; - - /* - * Public IP address of the master node of the cluster. - */ - @JsonProperty(value = "address") - private String address; - - /* - * Admin credentials for master node of the cluster - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** - * 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(); - } - } -} 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 3359fc67d9d8e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The HDInsightSchema model. */ -@Fluent -public class HDInsightSchema { - /* - * HDInsight compute properties - */ - @JsonProperty(value = "properties") - private HDInsightProperties properties; - - /** - * 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(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.java deleted file mode 100644 index 78657ac863ea2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HdfsDatastore.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The HdfsDatastore model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "datastoreType") -@JsonTypeName("Hdfs") -@Fluent -public final class HdfsDatastore extends DatastoreDetails { - /* - * The TLS cert of the HDFS server. Needs to be a base64 encoded string. - * Required if "Https" protocol is selected. - */ - @JsonProperty(value = "hdfsServerCertificate") - private String hdfsServerCertificate; - - /* - * [Required] IP Address or DNS HostName. - */ - @JsonProperty(value = "nameNodeAddress", required = true) - private String nameNodeAddress; - - /* - * Protocol used to communicate with the storage account (Https/Http). - */ - @JsonProperty(value = "protocol") - private String protocol; - - /** - * Get the hdfsServerCertificate property: The TLS cert of the HDFS server. Needs to be a base64 encoded string. - * Required if "Https" protocol is selected. - * - * @return the hdfsServerCertificate value. - */ - public String hdfsServerCertificate() { - return this.hdfsServerCertificate; - } - - /** - * Set the hdfsServerCertificate property: The TLS cert of the HDFS server. Needs to be a base64 encoded string. - * Required if "Https" protocol is selected. - * - * @param hdfsServerCertificate the hdfsServerCertificate value to set. - * @return the HdfsDatastore object itself. - */ - public HdfsDatastore withHdfsServerCertificate(String hdfsServerCertificate) { - this.hdfsServerCertificate = hdfsServerCertificate; - return this; - } - - /** - * Get the nameNodeAddress property: [Required] IP Address or DNS HostName. - * - * @return the nameNodeAddress value. - */ - public String nameNodeAddress() { - return this.nameNodeAddress; - } - - /** - * Set the nameNodeAddress property: [Required] IP Address or DNS HostName. - * - * @param nameNodeAddress the nameNodeAddress value to set. - * @return the HdfsDatastore object itself. - */ - public HdfsDatastore withNameNodeAddress(String nameNodeAddress) { - this.nameNodeAddress = nameNodeAddress; - return this; - } - - /** - * Get the protocol property: Protocol used to communicate with the storage account (Https/Http). - * - * @return the protocol value. - */ - public String protocol() { - return this.protocol; - } - - /** - * Set the protocol property: Protocol used to communicate with the storage account (Https/Http). - * - * @param protocol the protocol value to set. - * @return the HdfsDatastore object itself. - */ - public HdfsDatastore withProtocol(String protocol) { - this.protocol = protocol; - return this; - } - - /** {@inheritDoc} */ - @Override - public HdfsDatastore withCredentials(DatastoreCredentials credentials) { - super.withCredentials(credentials); - return this; - } - - /** {@inheritDoc} */ - @Override - public HdfsDatastore withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public HdfsDatastore withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public HdfsDatastore 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 (nameNodeAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property nameNodeAddress in model HdfsDatastore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HdfsDatastore.class); -} 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 4c4b923e9a0c2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its ARM resource ID. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("Id") -@Fluent -public final class IdAssetReference extends AssetReferenceBase { - /* - * [Required] ARM resource ID of the asset. - */ - @JsonProperty(value = "assetId", required = true) - private String assetId; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property assetId in model IdAssetReference")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IdAssetReference.class); -} 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 6bedd1f4e4bed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for identity configuration. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "identityType", - defaultImpl = IdentityConfiguration.class) -@JsonTypeName("IdentityConfiguration") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AMLToken", value = AmlToken.class), - @JsonSubTypes.Type(name = "Managed", value = ManagedIdentity.class), - @JsonSubTypes.Type(name = "UserIdentity", value = UserIdentity.class) -}) -@Immutable -public class IdentityConfiguration { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 339ffac53b88d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for IdentityConfigurationType. */ -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 or finds a IdentityConfigurationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityConfigurationType. - */ - @JsonCreator - 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 e04ce968ccc4a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Identity that will be used to access key vault for encryption at rest. */ -@Fluent -public final class IdentityForCmk { - /* - * The ArmId of the user assigned identity that will be used to access the - * customer managed key vault - */ - @JsonProperty(value = "userAssignedIdentity") - private String userAssignedIdentity; - - /** - * 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() { - } -} 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 752eb27aa901b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -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'. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ImageClassification") -@Fluent -public final class ImageClassification extends AutoMLVertical { - /* - * Primary metric to optimize for this task. - */ - @JsonProperty(value = "primaryMetric") - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - - /* - * [Required] Limit settings for the AutoML job. - */ - @JsonProperty(value = "limitSettings", required = true) - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - @JsonProperty(value = "sweepSettings") - private ImageSweepSettings sweepSettings; - - /** - * 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 dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** {@inheritDoc} */ - @Override - public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - 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 (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageClassification")); - } else { - dataSettings().validate(); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassification")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassification.class); -} 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 2c7c7d78b6783..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ImageClassificationBase model. */ -@Fluent -public class ImageClassificationBase extends ImageVertical { - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /** - * 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 withDataSettings(ImageVerticalDataSettings dataSettings) { - super.withDataSettings(dataSettings); - 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; - } - - /** - * 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()); - } - } -} 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 fe1a688746dfa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.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.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -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'. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ImageClassificationMultilabel") -@Fluent -public final class ImageClassificationMultilabel extends AutoMLVertical { - /* - * Primary metric to optimize for this task. - */ - @JsonProperty(value = "primaryMetric") - private ClassificationMultilabelPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsClassification modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - - /* - * [Required] Limit settings for the AutoML job. - */ - @JsonProperty(value = "limitSettings", required = true) - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - @JsonProperty(value = "sweepSettings") - private ImageSweepSettings sweepSettings; - - /** - * 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 dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - 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 (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageClassificationMultilabel")); - } else { - dataSettings().validate(); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassificationMultilabel")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationMultilabel.class); -} 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 c0ba2ca2140b2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -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. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ImageInstanceSegmentation") -@Fluent -public final class ImageInstanceSegmentation extends AutoMLVertical { - /* - * Primary metric to optimize for this task. - */ - @JsonProperty(value = "primaryMetric") - private InstanceSegmentationPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - - /* - * [Required] Limit settings for the AutoML job. - */ - @JsonProperty(value = "limitSettings", required = true) - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - @JsonProperty(value = "sweepSettings") - private ImageSweepSettings sweepSettings; - - /** - * 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 dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** {@inheritDoc} */ - @Override - public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - 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 (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageInstanceSegmentation")); - } else { - dataSettings().validate(); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageInstanceSegmentation")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageInstanceSegmentation.class); -} 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 470ee3ddfa6ef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Limit settings for the AutoML job. */ -@Fluent -public final class ImageLimitSettings { - /* - * Maximum number of concurrent AutoML iterations. - */ - @JsonProperty(value = "maxConcurrentTrials") - private Integer maxConcurrentTrials; - - /* - * Maximum number of AutoML iterations. - */ - @JsonProperty(value = "maxTrials") - private Integer maxTrials; - - /* - * AutoML job timeout. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 7632a871cbdc5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java +++ /dev/null @@ -1,848 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></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 { - /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. - */ - @JsonProperty(value = "amsGradient") - private String amsGradient; - - /* - * Settings for using Augmentations. - */ - @JsonProperty(value = "augmentations") - private String augmentations; - - /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "beta1") - private String beta1; - - /* - * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "beta2") - private String beta2; - - /* - * Whether to use distributer training. - */ - @JsonProperty(value = "distributed") - private String distributed; - - /* - * Enable early stopping logic during training. - */ - @JsonProperty(value = "earlyStopping") - 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. - */ - @JsonProperty(value = "earlyStoppingDelay") - 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. - */ - @JsonProperty(value = "earlyStoppingPatience") - private String earlyStoppingPatience; - - /* - * Enable normalization when exporting ONNX model. - */ - @JsonProperty(value = "enableOnnxNormalization") - private String enableOnnxNormalization; - - /* - * Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - */ - @JsonProperty(value = "evaluationFrequency") - private String evaluationFrequency; - - /* - * 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. - */ - @JsonProperty(value = "gradientAccumulationStep") - 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. - */ - @JsonProperty(value = "layersToFreeze") - private String layersToFreeze; - - /* - * Initial learning rate. Must be a float in the range [0, 1]. - */ - @JsonProperty(value = "learningRate") - private String learningRate; - - /* - * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - */ - @JsonProperty(value = "learningRateScheduler") - 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. - */ - @JsonProperty(value = "modelName") - private String modelName; - - /* - * Value of momentum when optimizer is 'sgd'. Must be a float in the range - * [0, 1]. - */ - @JsonProperty(value = "momentum") - private String momentum; - - /* - * Enable nesterov when optimizer is 'sgd'. - */ - @JsonProperty(value = "nesterov") - private String nesterov; - - /* - * Number of training epochs. Must be a positive integer. - */ - @JsonProperty(value = "numberOfEpochs") - private String numberOfEpochs; - - /* - * Number of data loader workers. Must be a non-negative integer. - */ - @JsonProperty(value = "numberOfWorkers") - private String numberOfWorkers; - - /* - * Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'. - */ - @JsonProperty(value = "optimizer") - private String optimizer; - - /* - * Random seed to be used when using deterministic training. - */ - @JsonProperty(value = "randomSeed") - private String randomSeed; - - /* - * If validation data is not defined, this specifies the split ratio for - * splitting - * train data into random train and validation subsets. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "splitRatio") - private String splitRatio; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float - * in the range [0, 1]. - */ - @JsonProperty(value = "stepLRGamma") - private String stepLRGamma; - - /* - * Value of step size when learning rate scheduler is 'step'. Must be a - * positive integer. - */ - @JsonProperty(value = "stepLRStepSize") - private String stepLRStepSize; - - /* - * Training batch size. Must be a positive integer. - */ - @JsonProperty(value = "trainingBatchSize") - private String trainingBatchSize; - - /* - * Validation batch size. Must be a positive integer. - */ - @JsonProperty(value = "validationBatchSize") - private String validationBatchSize; - - /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - */ - @JsonProperty(value = "warmupCosineLRCycles") - private String warmupCosineLRCycles; - - /* - * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. - * Must be a positive integer. - */ - @JsonProperty(value = "warmupCosineLRWarmupEpochs") - private String warmupCosineLRWarmupEpochs; - - /* - * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must - * be a float in the range[0, 1]. - */ - @JsonProperty(value = "weightDecay") - private String weightDecay; - - /** - * 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 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 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 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 splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @return the splitRatio value. - */ - public String splitRatio() { - return this.splitRatio; - } - - /** - * Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @param splitRatio the splitRatio value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withSplitRatio(String splitRatio) { - this.splitRatio = splitRatio; - 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() { - } -} 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 0bbfd9392f0f6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></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. - */ - @JsonProperty(value = "trainingCropSize") - private String trainingCropSize; - - /* - * Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - */ - @JsonProperty(value = "validationCropSize") - private String validationCropSize; - - /* - * Image size to which to resize before cropping for validation dataset. - * Must be a positive integer. - */ - @JsonProperty(value = "validationResizeSize") - 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. - */ - @JsonProperty(value = "weightedLoss") - private String weightedLoss; - - /** - * 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 withEnableOnnxNormalization(String enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withEvaluationFrequency(String evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - 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 withSplitRatio(String splitRatio) { - super.withSplitRatio(splitRatio); - 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(); - } -} 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 4a1d8df91b977..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java +++ /dev/null @@ -1,639 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * Distribution expressions to sweep over values of model settings. <example> Some examples are: <code> - * ModelName = "choice('seresnext', 'resnest50')"; LearningRate = "uniform(0.001, 0.01)"; LayersToFreeze = "choice(0, - * 2)"; </code></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. - */ - @JsonProperty(value = "boxDetectionsPerImage") - private String boxDetectionsPerImage; - - /* - * During inference, only return proposals with a classification score - * greater than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - */ - @JsonProperty(value = "boxScoreThreshold") - 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. - */ - @JsonProperty(value = "imageSize") - 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. - */ - @JsonProperty(value = "maxSize") - 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. - */ - @JsonProperty(value = "minSize") - 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. - */ - @JsonProperty(value = "modelSize") - 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. - */ - @JsonProperty(value = "multiScale") - private String multiScale; - - /* - * IOU threshold used during inference in NMS post processing. Must be - * float in the range [0, 1]. - */ - @JsonProperty(value = "nmsIouThreshold") - 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. - */ - @JsonProperty(value = "tileGridSize") - 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. - */ - @JsonProperty(value = "tileOverlapRatio") - 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 - */ - @JsonProperty(value = "tilePredictionsNmsThreshold") - private String tilePredictionsNmsThreshold; - - /* - * IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - */ - @JsonProperty(value = "validationIouThreshold") - private String validationIouThreshold; - - /* - * Metric computation method to use for validation metrics. Must be 'none', - * 'coco', 'voc', or 'coco_voc'. - */ - @JsonProperty(value = "validationMetricType") - private String validationMetricType; - - /** - * 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 withEnableOnnxNormalization(String enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withEvaluationFrequency(String evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - 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 withSplitRatio(String splitRatio) { - super.withSplitRatio(splitRatio); - 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(); - } -} 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 29c1d42ca455c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * 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 { - /* - * Settings for advanced scenarios. - */ - @JsonProperty(value = "advancedSettings") - private String advancedSettings; - - /* - * Enable AMSGrad when optimizer is 'adam' or 'adamw'. - */ - @JsonProperty(value = "amsGradient") - private Boolean amsGradient; - - /* - * Settings for using Augmentations. - */ - @JsonProperty(value = "augmentations") - private String augmentations; - - /* - * Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "beta1") - private Float beta1; - - /* - * Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "beta2") - private Float beta2; - - /* - * FileDataset id for pretrained checkpoint(s) for incremental training. - * Make sure to pass CheckpointFilename along with CheckpointDatasetId. - */ - @JsonProperty(value = "checkpointDatasetId") - private String checkpointDatasetId; - - /* - * The pretrained checkpoint filename in FileDataset for incremental - * training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. - */ - @JsonProperty(value = "checkpointFilename") - private String checkpointFilename; - - /* - * Frequency to store model checkpoints. Must be a positive integer. - */ - @JsonProperty(value = "checkpointFrequency") - private Integer checkpointFrequency; - - /* - * The id of a previous run that has a pretrained checkpoint for - * incremental training. - */ - @JsonProperty(value = "checkpointRunId") - private String checkpointRunId; - - /* - * Whether to use distributed training. - */ - @JsonProperty(value = "distributed") - private Boolean distributed; - - /* - * Enable early stopping logic during training. - */ - @JsonProperty(value = "earlyStopping") - 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. - */ - @JsonProperty(value = "earlyStoppingDelay") - 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. - */ - @JsonProperty(value = "earlyStoppingPatience") - private Integer earlyStoppingPatience; - - /* - * Enable normalization when exporting ONNX model. - */ - @JsonProperty(value = "enableOnnxNormalization") - private Boolean enableOnnxNormalization; - - /* - * Frequency to evaluate validation dataset to get metric scores. Must be a - * positive integer. - */ - @JsonProperty(value = "evaluationFrequency") - private Integer evaluationFrequency; - - /* - * 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. - */ - @JsonProperty(value = "gradientAccumulationStep") - 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. - */ - @JsonProperty(value = "layersToFreeze") - private Integer layersToFreeze; - - /* - * Initial learning rate. Must be a float in the range [0, 1]. - */ - @JsonProperty(value = "learningRate") - private Float learningRate; - - /* - * Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'. - */ - @JsonProperty(value = "learningRateScheduler") - 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. - */ - @JsonProperty(value = "modelName") - private String modelName; - - /* - * Value of momentum when optimizer is 'sgd'. Must be a float in the range - * [0, 1]. - */ - @JsonProperty(value = "momentum") - private Float momentum; - - /* - * Enable nesterov when optimizer is 'sgd'. - */ - @JsonProperty(value = "nesterov") - private Boolean nesterov; - - /* - * Number of training epochs. Must be a positive integer. - */ - @JsonProperty(value = "numberOfEpochs") - private Integer numberOfEpochs; - - /* - * Number of data loader workers. Must be a non-negative integer. - */ - @JsonProperty(value = "numberOfWorkers") - private Integer numberOfWorkers; - - /* - * Type of optimizer. - */ - @JsonProperty(value = "optimizer") - private StochasticOptimizer optimizer; - - /* - * Random seed to be used when using deterministic training. - */ - @JsonProperty(value = "randomSeed") - private Integer randomSeed; - - /* - * If validation data is not defined, this specifies the split ratio for - * splitting - * train data into random train and validation subsets. Must be a float in - * the range [0, 1]. - */ - @JsonProperty(value = "splitRatio") - private Float splitRatio; - - /* - * Value of gamma when learning rate scheduler is 'step'. Must be a float - * in the range [0, 1]. - */ - @JsonProperty(value = "stepLRGamma") - private Float stepLRGamma; - - /* - * Value of step size when learning rate scheduler is 'step'. Must be a - * positive integer. - */ - @JsonProperty(value = "stepLRStepSize") - private Integer stepLRStepSize; - - /* - * Training batch size. Must be a positive integer. - */ - @JsonProperty(value = "trainingBatchSize") - private Integer trainingBatchSize; - - /* - * Validation batch size. Must be a positive integer. - */ - @JsonProperty(value = "validationBatchSize") - private Integer validationBatchSize; - - /* - * Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - */ - @JsonProperty(value = "warmupCosineLRCycles") - private Float warmupCosineLRCycles; - - /* - * Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. - * Must be a positive integer. - */ - @JsonProperty(value = "warmupCosineLRWarmupEpochs") - private Integer warmupCosineLRWarmupEpochs; - - /* - * Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must - * be a float in the range[0, 1]. - */ - @JsonProperty(value = "weightDecay") - private Float weightDecay; - - /** - * 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 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 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 checkpointDatasetId property: FileDataset id for pretrained checkpoint(s) for incremental training. Make - * sure to pass CheckpointFilename along with CheckpointDatasetId. - * - * @return the checkpointDatasetId value. - */ - public String checkpointDatasetId() { - return this.checkpointDatasetId; - } - - /** - * Set the checkpointDatasetId property: FileDataset id for pretrained checkpoint(s) for incremental training. Make - * sure to pass CheckpointFilename along with CheckpointDatasetId. - * - * @param checkpointDatasetId the checkpointDatasetId value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointDatasetId(String checkpointDatasetId) { - this.checkpointDatasetId = checkpointDatasetId; - return this; - } - - /** - * Get the checkpointFilename property: The pretrained checkpoint filename in FileDataset for incremental training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. - * - * @return the checkpointFilename value. - */ - public String checkpointFilename() { - return this.checkpointFilename; - } - - /** - * Set the checkpointFilename property: The pretrained checkpoint filename in FileDataset for incremental training. - * Make sure to pass CheckpointDatasetId along with CheckpointFilename. - * - * @param checkpointFilename the checkpointFilename value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointFilename(String checkpointFilename) { - this.checkpointFilename = checkpointFilename; - 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 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 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 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 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 splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @return the splitRatio value. - */ - public Float splitRatio() { - return this.splitRatio; - } - - /** - * Set the splitRatio property: If validation data is not defined, this specifies the split ratio for splitting - * train data into random train and validation subsets. Must be a float in the range [0, 1]. - * - * @param splitRatio the splitRatio value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withSplitRatio(Float splitRatio) { - this.splitRatio = splitRatio; - 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() { - } -} 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 38153e69f12d4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * 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. - */ - @JsonProperty(value = "trainingCropSize") - private Integer trainingCropSize; - - /* - * Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - */ - @JsonProperty(value = "validationCropSize") - private Integer validationCropSize; - - /* - * Image size to which to resize before cropping for validation dataset. - * Must be a positive integer. - */ - @JsonProperty(value = "validationResizeSize") - 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. - */ - @JsonProperty(value = "weightedLoss") - private Integer weightedLoss; - - /** - * 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 withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); - 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 withCheckpointDatasetId(String checkpointDatasetId) { - super.withCheckpointDatasetId(checkpointDatasetId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withCheckpointFilename(String checkpointFilename) { - super.withCheckpointFilename(checkpointFilename); - 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 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 withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - 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 withSplitRatio(Float splitRatio) { - super.withSplitRatio(splitRatio); - 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(); - } -} 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 9d79afb1992aa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java +++ /dev/null @@ -1,664 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * 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. - */ - @JsonProperty(value = "boxDetectionsPerImage") - private Integer boxDetectionsPerImage; - - /* - * During inference, only return proposals with a classification score - * greater than - * BoxScoreThreshold. Must be a float in the range[0, 1]. - */ - @JsonProperty(value = "boxScoreThreshold") - 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. - */ - @JsonProperty(value = "imageSize") - 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. - */ - @JsonProperty(value = "maxSize") - 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. - */ - @JsonProperty(value = "minSize") - 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. - */ - @JsonProperty(value = "modelSize") - 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. - */ - @JsonProperty(value = "multiScale") - private Boolean multiScale; - - /* - * IOU threshold used during inference in NMS post processing. Must be a - * float in the range [0, 1]. - */ - @JsonProperty(value = "nmsIouThreshold") - 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. - */ - @JsonProperty(value = "tileGridSize") - 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. - */ - @JsonProperty(value = "tileOverlapRatio") - 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. - */ - @JsonProperty(value = "tilePredictionsNmsThreshold") - private Float tilePredictionsNmsThreshold; - - /* - * IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - */ - @JsonProperty(value = "validationIouThreshold") - private Float validationIouThreshold; - - /* - * Metric computation method to use for validation metrics. - */ - @JsonProperty(value = "validationMetricType") - private ValidationMetricType validationMetricType; - - /** - * 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 withAdvancedSettings(String advancedSettings) { - super.withAdvancedSettings(advancedSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withAmsGradient(Boolean amsGradient) { - super.withAmsGradient(amsGradient); - 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 withCheckpointDatasetId(String checkpointDatasetId) { - super.withCheckpointDatasetId(checkpointDatasetId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withCheckpointFilename(String checkpointFilename) { - super.withCheckpointFilename(checkpointFilename); - 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 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 withEnableOnnxNormalization(Boolean enableOnnxNormalization) { - super.withEnableOnnxNormalization(enableOnnxNormalization); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withEvaluationFrequency(Integer evaluationFrequency) { - super.withEvaluationFrequency(evaluationFrequency); - 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 withSplitRatio(Float splitRatio) { - super.withSplitRatio(splitRatio); - 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(); - } -} 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 7bbc8629bbc85..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -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. - */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("ImageObjectDetection") -@Fluent -public final class ImageObjectDetection extends AutoMLVertical { - /* - * Primary metric to optimize for this task. - */ - @JsonProperty(value = "primaryMetric") - private ObjectDetectionPrimaryMetrics primaryMetric; - - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - - /* - * [Required] Limit settings for the AutoML job. - */ - @JsonProperty(value = "limitSettings", required = true) - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - @JsonProperty(value = "sweepSettings") - private ImageSweepSettings sweepSettings; - - /** - * 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 dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - 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 (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataSettings in model ImageObjectDetection")); - } else { - dataSettings().validate(); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageObjectDetection")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetection.class); -} 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 c07185d60cff2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The ImageObjectDetectionBase model. */ -@Fluent -public class ImageObjectDetectionBase extends ImageVertical { - /* - * Settings used for training the model. - */ - @JsonProperty(value = "modelSettings") - private ImageModelSettingsObjectDetection modelSettings; - - /* - * Search space for sampling different combinations of models and their - * hyperparameters. - */ - @JsonProperty(value = "searchSpace") - private List searchSpace; - - /** - * 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 withDataSettings(ImageVerticalDataSettings dataSettings) { - super.withDataSettings(dataSettings); - 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; - } - - /** - * 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()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepLimitSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepLimitSettings.java deleted file mode 100644 index 217204f228a65..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepLimitSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Limit settings for model sweeping and hyperparameter sweeping. */ -@Fluent -public final class ImageSweepLimitSettings { - /* - * Maximum number of concurrent iterations for the underlying Sweep job. - */ - @JsonProperty(value = "maxConcurrentTrials") - private Integer maxConcurrentTrials; - - /* - * Maximum number of iterations for the underlying Sweep job. - */ - @JsonProperty(value = "maxTrials") - private Integer maxTrials; - - /** - * Get the maxConcurrentTrials property: Maximum number of concurrent iterations for the underlying Sweep job. - * - * @return the maxConcurrentTrials value. - */ - public Integer maxConcurrentTrials() { - return this.maxConcurrentTrials; - } - - /** - * Set the maxConcurrentTrials property: Maximum number of concurrent iterations for the underlying Sweep job. - * - * @param maxConcurrentTrials the maxConcurrentTrials value to set. - * @return the ImageSweepLimitSettings object itself. - */ - public ImageSweepLimitSettings withMaxConcurrentTrials(Integer maxConcurrentTrials) { - this.maxConcurrentTrials = maxConcurrentTrials; - return this; - } - - /** - * Get the maxTrials property: Maximum number of iterations for the underlying Sweep job. - * - * @return the maxTrials value. - */ - public Integer maxTrials() { - return this.maxTrials; - } - - /** - * Set the maxTrials property: Maximum number of iterations for the underlying Sweep job. - * - * @param maxTrials the maxTrials value to set. - * @return the ImageSweepLimitSettings object itself. - */ - public ImageSweepLimitSettings withMaxTrials(Integer maxTrials) { - this.maxTrials = maxTrials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 d16c5b2cd5e55..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Model sweeping and hyperparameter sweeping related settings. */ -@Fluent -public final class ImageSweepSettings { - /* - * Type of early termination policy. - */ - @JsonProperty(value = "earlyTermination") - private EarlyTerminationPolicy earlyTermination; - - /* - * [Required] Limit settings for model sweeping and hyperparameter - * sweeping. - */ - @JsonProperty(value = "limits", required = true) - private ImageSweepLimitSettings limits; - - /* - * [Required] Type of the hyperparameter sampling algorithms. - */ - @JsonProperty(value = "samplingAlgorithm", required = true) - private SamplingAlgorithmType samplingAlgorithm; - - /** - * 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; - } - - /** - * Get the limits property: [Required] Limit settings for model sweeping and hyperparameter sweeping. - * - * @return the limits value. - */ - public ImageSweepLimitSettings limits() { - return this.limits; - } - - /** - * Set the limits property: [Required] Limit settings for model sweeping and hyperparameter sweeping. - * - * @param limits the limits value to set. - * @return the ImageSweepSettings object itself. - */ - public ImageSweepSettings withLimits(ImageSweepLimitSettings limits) { - this.limits = limits; - return this; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (earlyTermination() != null) { - earlyTermination().validate(); - } - if (limits() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property limits in model ImageSweepSettings")); - } else { - limits().validate(); - } - if (samplingAlgorithm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property samplingAlgorithm in model ImageSweepSettings")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageSweepSettings.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 ec807a1c2c4a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.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.fasterxml.jackson.annotation.JsonProperty; - -/** - * 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 { - /* - * [Required] Collection of registered Tabular Dataset Ids and other data - * settings required for training and validating models. - */ - @JsonProperty(value = "dataSettings", required = true) - private ImageVerticalDataSettings dataSettings; - - /* - * [Required] Limit settings for the AutoML job. - */ - @JsonProperty(value = "limitSettings", required = true) - private ImageLimitSettings limitSettings; - - /* - * Model sweeping and hyperparameter sweeping related settings. - */ - @JsonProperty(value = "sweepSettings") - private ImageSweepSettings sweepSettings; - - /** - * Get the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @return the dataSettings value. - */ - public ImageVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: [Required] Collection of registered Tabular Dataset Ids and other data settings - * required for training and validating models. - * - * @param dataSettings the dataSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withDataSettings(ImageVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property dataSettings in model ImageVertical")); - } else { - dataSettings().validate(); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageVertical.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalDataSettings.java deleted file mode 100644 index d2ea7cb6a60c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalDataSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Collection of registered Tabular Dataset Ids and other data settings required for training and validating models. */ -@Fluent -public final class ImageVerticalDataSettings extends DataSettings { - /* - * Settings for the validation dataset. - */ - @JsonProperty(value = "validationData") - private ImageVerticalValidationDataSettings validationData; - - /** - * Get the validationData property: Settings for the validation dataset. - * - * @return the validationData value. - */ - public ImageVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Settings for the validation dataset. - * - * @param validationData the validationData value to set. - * @return the ImageVerticalDataSettings object itself. - */ - public ImageVerticalDataSettings withValidationData(ImageVerticalValidationDataSettings validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.java deleted file mode 100644 index 379528c0c12f9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVerticalValidationDataSettings.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.annotation.Fluent; - -/** The ImageVerticalValidationDataSettings model. */ -@Fluent -public final class ImageVerticalValidationDataSettings extends ValidationDataSettings { - /** {@inheritDoc} */ - @Override - public ImageVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageVerticalValidationDataSettings 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(); - } -} 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 a34ad497637ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The InferenceContainerProperties model. */ -@Fluent -public final class InferenceContainerProperties { - /* - * The route to check the liveness of the inference server container. - */ - @JsonProperty(value = "livenessRoute") - private Route livenessRoute; - - /* - * The route to check the readiness of the inference server container. - */ - @JsonProperty(value = "readinessRoute") - private Route readinessRoute; - - /* - * The port to send the scoring requests to, within the inference server - * container. - */ - @JsonProperty(value = "scoringRoute") - private Route scoringRoute; - - /** - * 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(); - } - } -} 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 f83179d08a1c0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for InputDeliveryMode. */ -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 or finds a InputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding InputDeliveryMode. - */ - @JsonCreator - 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 1b9e942cbe377..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for InstanceSegmentationPrimaryMetrics. */ -public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. */ - public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates or finds a InstanceSegmentationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding InstanceSegmentationPrimaryMetrics. - */ - @JsonCreator - 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 48d8d28f9935b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Instance type schema. */ -@Fluent -public final class InstanceTypeSchema { - /* - * Node Selector - */ - @JsonProperty(value = "nodeSelector") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map nodeSelector; - - /* - * Resource requests/limits for this instance type - */ - @JsonProperty(value = "resources") - private InstanceTypeSchemaResources resources; - - /** - * 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(); - } - } -} 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 ccc6ff2a9b2be..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Resource requests/limits for this instance type. */ -@Fluent -public final class InstanceTypeSchemaResources { - /* - * Resource requests for this instance type - */ - @JsonProperty(value = "requests") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map requests; - - /* - * Resource limits for this instance type - */ - @JsonProperty(value = "limits") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map limits; - - /** - * 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() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.java deleted file mode 100644 index 8ab96f963cf35..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseData.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.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; - -/** An immutable client-side representation of JobBaseData. */ -public interface JobBaseData { - /** - * 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. - */ - JobBaseDetails 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.JobBaseDataInner object. - * - * @return the inner object. - */ - JobBaseDataInner innerModel(); - - /** The entirety of the JobBaseData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The JobBaseData definition stages. */ - interface DefinitionStages { - /** The first stage of the JobBaseData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the JobBaseData 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 JobBaseData 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(JobBaseDetails properties); - } - /** - * The stage of the JobBaseData 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. - */ - JobBaseData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JobBaseData create(Context context); - } - } - /** - * Begins update for the JobBaseData resource. - * - * @return the stage of resource update. - */ - JobBaseData.Update update(); - - /** The template for JobBaseData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JobBaseData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JobBaseData apply(Context context); - } - /** The JobBaseData update stages. */ - interface UpdateStages { - /** The stage of the JobBaseData 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(JobBaseDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JobBaseData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JobBaseData refresh(Context context); - - /** - * Cancels a Job. - * - * @throws com.azure.core.management.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. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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 cancelWithResponse(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java deleted file mode 100644 index a710530ab7f11..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseDetails.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Base definition for a job. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobType", - defaultImpl = JobBaseDetails.class) -@JsonTypeName("JobBaseDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "AutoML", value = AutoMLJob.class), - @JsonSubTypes.Type(name = "Command", value = CommandJob.class), - @JsonSubTypes.Type(name = "Pipeline", value = PipelineJob.class), - @JsonSubTypes.Type(name = "Sweep", value = SweepJob.class) -}) -@Fluent -public class JobBaseDetails extends ResourceBase { - /* - * ARM resource ID of the compute resource. - */ - @JsonProperty(value = "computeId") - private String computeId; - - /* - * Display name of job. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * The name of the experiment the job belongs to. If not set, the job is - * placed in the "Default" experiment. - */ - @JsonProperty(value = "experimentName") - private String experimentName; - - /* - * Identity configuration. If set, this should be one of AmlToken, - * ManagedIdentity, UserIdentity or null. - * Defaults to AmlToken if null. - */ - @JsonProperty(value = "identity") - private IdentityConfiguration identity; - - /* - * Is the asset archived? - */ - @JsonProperty(value = "isArchived") - private Boolean isArchived; - - /* - * Schedule definition of job. - * If no schedule is provided, the job is run once and immediately after - * submission. - */ - @JsonProperty(value = "schedule") - private ScheduleBase schedule; - - /* - * List of JobEndpoints. - * For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. - */ - @JsonProperty(value = "services") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map services; - - /* - * Status of the job. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private JobStatus status; - - /** - * 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 JobBaseDetails object itself. - */ - public JobBaseDetails withComputeId(String computeId) { - this.computeId = computeId; - return this; - } - - /** - * 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 JobBaseDetails object itself. - */ - public JobBaseDetails withDisplayName(String displayName) { - this.displayName = displayName; - 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 JobBaseDetails object itself. - */ - public JobBaseDetails withExperimentName(String experimentName) { - this.experimentName = experimentName; - 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 JobBaseDetails object itself. - */ - public JobBaseDetails withIdentity(IdentityConfiguration identity) { - this.identity = identity; - 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 JobBaseDetails object itself. - */ - public JobBaseDetails withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the schedule property: Schedule definition of job. If no schedule is provided, the job is run once and - * immediately after submission. - * - * @return the schedule value. - */ - public ScheduleBase schedule() { - return this.schedule; - } - - /** - * Set the schedule property: Schedule definition of job. If no schedule is provided, the job is run once and - * immediately after submission. - * - * @param schedule the schedule value to set. - * @return the JobBaseDetails object itself. - */ - public JobBaseDetails withSchedule(ScheduleBase schedule) { - this.schedule = schedule; - 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 JobBaseDetails object itself. - */ - public JobBaseDetails withServices(Map services) { - this.services = services; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** {@inheritDoc} */ - @Override - public JobBaseDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobBaseDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobBaseDetails 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(); - } - if (schedule() != null) { - schedule().validate(); - } - if (services() != null) { - services() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} 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 fd407407a447f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of JobBase entities. */ -@Fluent -public final class JobBaseResourceArmPaginatedResult { - /* - * The link to the next page of JobBase objects. If null, there are no - * additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type JobBase. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 f199a9b1d5105..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Command job definition. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobInputType", - defaultImpl = JobInput.class) -@JsonTypeName("JobInput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "MLTable", value = MLTableJobInput.class), - @JsonSubTypes.Type(name = "CustomModel", value = CustomModelJobInput.class), - @JsonSubTypes.Type(name = "Literal", value = LiteralJobInput.class), - @JsonSubTypes.Type(name = "MLFlowModel", value = MLFlowModelJobInput.class), - @JsonSubTypes.Type(name = "TritonModel", value = TritonModelJobInput.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileJobInput.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderJobInput.class) -}) -@Fluent -public class JobInput { - /* - * Description for the input. - */ - @JsonProperty(value = "description") - private String description; - - /** - * 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() { - } -} 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 a6bf86251e040..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobInputType. */ -public final class JobInputType extends ExpandableStringEnum { - /** Static value Literal for JobInputType. */ - public static final JobInputType LITERAL = fromString("Literal"); - - /** Static value UriFile for JobInputType. */ - public static final JobInputType URI_FILE = fromString("UriFile"); - - /** Static value UriFolder for JobInputType. */ - public static final JobInputType URI_FOLDER = fromString("UriFolder"); - - /** Static value MLTable for JobInputType. */ - public static final JobInputType MLTABLE = fromString("MLTable"); - - /** Static value CustomModel for JobInputType. */ - public static final JobInputType CUSTOM_MODEL = fromString("CustomModel"); - - /** Static value MLFlowModel for JobInputType. */ - public static final JobInputType MLFLOW_MODEL = fromString("MLFlowModel"); - - /** Static value TritonModel for JobInputType. */ - public static final JobInputType TRITON_MODEL = fromString("TritonModel"); - - /** - * Creates or finds a JobInputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobInputType. - */ - @JsonCreator - 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 42eb703e246f8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** The JobLimits model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobLimitsType", - defaultImpl = JobLimits.class) -@JsonTypeName("JobLimits") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Command", value = CommandJobLimits.class), - @JsonSubTypes.Type(name = "Sweep", value = SweepJobLimits.class) -}) -@Fluent -public class 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. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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() { - } -} 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 56991231ccf7e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a JobLimitsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobLimitsType. - */ - @JsonCreator - 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 6204ce4d27cf9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Job output definition container information on where to find job output/logs. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "jobOutputType", - defaultImpl = JobOutput.class) -@JsonTypeName("JobOutput") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "CustomModel", value = CustomModelJobOutput.class), - @JsonSubTypes.Type(name = "MLFlowModel", value = MLFlowModelJobOutput.class), - @JsonSubTypes.Type(name = "MLTable", value = MLTableJobOutput.class), - @JsonSubTypes.Type(name = "TritonModel", value = TritonModelJobOutput.class), - @JsonSubTypes.Type(name = "UriFile", value = UriFileJobOutput.class), - @JsonSubTypes.Type(name = "UriFolder", value = UriFolderJobOutput.class) -}) -@Fluent -public class JobOutput { - /* - * Description for the output. - */ - @JsonProperty(value = "description") - private String description; - - /** - * 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() { - } -} 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 23f9d16fd47c8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobOutputType. */ -public final class JobOutputType extends ExpandableStringEnum { - /** Static value UriFile for JobOutputType. */ - public static final JobOutputType URI_FILE = fromString("UriFile"); - - /** Static value UriFolder for JobOutputType. */ - public static final JobOutputType URI_FOLDER = fromString("UriFolder"); - - /** Static value MLTable for JobOutputType. */ - public static final JobOutputType MLTABLE = fromString("MLTable"); - - /** Static value CustomModel for JobOutputType. */ - public static final JobOutputType CUSTOM_MODEL = fromString("CustomModel"); - - /** Static value MLFlowModel for JobOutputType. */ - public static final JobOutputType MLFLOW_MODEL = fromString("MLFlowModel"); - - /** Static value TritonModel for JobOutputType. */ - public static final JobOutputType TRITON_MODEL = fromString("TritonModel"); - - /** - * Creates or finds a JobOutputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobOutputType. - */ - @JsonCreator - 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/JobService.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java deleted file mode 100644 index ee961f84b0f56..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Job endpoint definition. */ -@Fluent -public final class JobService { - /* - * Url for endpoint. - */ - @JsonProperty(value = "endpoint") - private String endpoint; - - /* - * Any error in the service. - */ - @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) - private String errorMessage; - - /* - * Endpoint type. - */ - @JsonProperty(value = "jobServiceType") - private String jobServiceType; - - /* - * Port for endpoint. - */ - @JsonProperty(value = "port") - private Integer port; - - /* - * Additional properties to set on the endpoint. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /* - * Status of endpoint. - */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private String status; - - /** - * 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 errorMessage property: Any error in the service. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * 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 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 status property: Status of endpoint. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 68313ffb2ca6c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobStatus. */ -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"); - - /** Static value Scheduled for JobStatus. */ - public static final JobStatus SCHEDULED = fromString("Scheduled"); - - /** - * Creates or finds a JobStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobStatus. - */ - @JsonCreator - 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/JobType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.java deleted file mode 100644 index 04f1769d5774c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for JobType. */ -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"); - - /** - * Creates or finds a JobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobType. - */ - @JsonCreator - 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 7663da5b1b7bb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.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; - -/** 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 scheduled Indicator whether the job is scheduled job. - * @param scheduleId The scheduled id for listing the job triggered from. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - Boolean scheduled, - String scheduleId, - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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. - */ - JobBaseData get(String resourceGroupName, String workspaceName, String id); - - /** - * 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); - - /** - * Cancels a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * - * @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 Response}. - */ - Response cancelWithResponse(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}. - */ - JobBaseData 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 JobBaseData resource. - * - * @param name resource name. - * @return the first stage of the new JobBaseData definition. - */ - JobBaseData.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.java deleted file mode 100644 index d885160183b60..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosCredentials.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.fasterxml.jackson.annotation.JsonProperty; - -/** The KerberosCredentials model. */ -@Fluent -public class KerberosCredentials { - /* - * [Required] IP Address or DNS HostName. - */ - @JsonProperty(value = "kerberosKdcAddress", required = true) - private String kerberosKdcAddress; - - /* - * [Required] Kerberos Username - */ - @JsonProperty(value = "kerberosPrincipal", required = true) - private String kerberosPrincipal; - - /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. - */ - @JsonProperty(value = "kerberosRealm", required = true) - private String kerberosRealm; - - /** - * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @return the kerberosKdcAddress value. - */ - public String kerberosKdcAddress() { - return this.kerberosKdcAddress; - } - - /** - * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @param kerberosKdcAddress the kerberosKdcAddress value to set. - * @return the KerberosCredentials object itself. - */ - public KerberosCredentials withKerberosKdcAddress(String kerberosKdcAddress) { - this.kerberosKdcAddress = kerberosKdcAddress; - return this; - } - - /** - * Get the kerberosPrincipal property: [Required] Kerberos Username. - * - * @return the kerberosPrincipal value. - */ - public String kerberosPrincipal() { - return this.kerberosPrincipal; - } - - /** - * Set the kerberosPrincipal property: [Required] Kerberos Username. - * - * @param kerberosPrincipal the kerberosPrincipal value to set. - * @return the KerberosCredentials object itself. - */ - public KerberosCredentials withKerberosPrincipal(String kerberosPrincipal) { - this.kerberosPrincipal = kerberosPrincipal; - return this; - } - - /** - * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @return the kerberosRealm value. - */ - public String kerberosRealm() { - return this.kerberosRealm; - } - - /** - * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @param kerberosRealm the kerberosRealm value to set. - * @return the KerberosCredentials object itself. - */ - public KerberosCredentials withKerberosRealm(String kerberosRealm) { - this.kerberosRealm = kerberosRealm; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (kerberosKdcAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosKdcAddress in model KerberosCredentials")); - } - if (kerberosPrincipal() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosPrincipal in model KerberosCredentials")); - } - if (kerberosRealm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosRealm in model KerberosCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KerberosCredentials.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.java deleted file mode 100644 index d080800ab04ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabCredentials.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The KerberosKeytabCredentials model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("KerberosKeytab") -@Fluent -public final class KerberosKeytabCredentials extends DatastoreCredentials { - /* - * [Required] Keytab secrets. - */ - @JsonProperty(value = "secrets", required = true) - private KerberosKeytabSecrets secrets; - - /* - * [Required] IP Address or DNS HostName. - */ - @JsonProperty(value = "kerberosKdcAddress", required = true) - private String kerberosKdcAddress; - - /* - * [Required] Kerberos Username - */ - @JsonProperty(value = "kerberosPrincipal", required = true) - private String kerberosPrincipal; - - /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. - */ - @JsonProperty(value = "kerberosRealm", required = true) - private String kerberosRealm; - - /** - * Get the secrets property: [Required] Keytab secrets. - * - * @return the secrets value. - */ - public KerberosKeytabSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Keytab secrets. - * - * @param secrets the secrets value to set. - * @return the KerberosKeytabCredentials object itself. - */ - public KerberosKeytabCredentials withSecrets(KerberosKeytabSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @return the kerberosKdcAddress value. - */ - public String kerberosKdcAddress() { - return this.kerberosKdcAddress; - } - - /** - * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @param kerberosKdcAddress the kerberosKdcAddress value to set. - * @return the KerberosKeytabCredentials object itself. - */ - public KerberosKeytabCredentials withKerberosKdcAddress(String kerberosKdcAddress) { - this.kerberosKdcAddress = kerberosKdcAddress; - return this; - } - - /** - * Get the kerberosPrincipal property: [Required] Kerberos Username. - * - * @return the kerberosPrincipal value. - */ - public String kerberosPrincipal() { - return this.kerberosPrincipal; - } - - /** - * Set the kerberosPrincipal property: [Required] Kerberos Username. - * - * @param kerberosPrincipal the kerberosPrincipal value to set. - * @return the KerberosKeytabCredentials object itself. - */ - public KerberosKeytabCredentials withKerberosPrincipal(String kerberosPrincipal) { - this.kerberosPrincipal = kerberosPrincipal; - return this; - } - - /** - * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @return the kerberosRealm value. - */ - public String kerberosRealm() { - return this.kerberosRealm; - } - - /** - * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @param kerberosRealm the kerberosRealm value to set. - * @return the KerberosKeytabCredentials object itself. - */ - public KerberosKeytabCredentials withKerberosRealm(String kerberosRealm) { - this.kerberosRealm = kerberosRealm; - 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model KerberosKeytabCredentials")); - } else { - secrets().validate(); - } - if (kerberosKdcAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosKdcAddress in model KerberosKeytabCredentials")); - } - if (kerberosPrincipal() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosPrincipal in model KerberosKeytabCredentials")); - } - if (kerberosRealm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosRealm in model KerberosKeytabCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KerberosKeytabCredentials.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.java deleted file mode 100644 index 9176bce6dd063..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosKeytabSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The KerberosKeytabSecrets model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("KerberosKeytab") -@Fluent -public final class KerberosKeytabSecrets extends DatastoreSecretsInner { - /* - * Kerberos keytab secret. - */ - @JsonProperty(value = "kerberosKeytab") - private String kerberosKeytab; - - /** - * Get the kerberosKeytab property: Kerberos keytab secret. - * - * @return the kerberosKeytab value. - */ - public String kerberosKeytab() { - return this.kerberosKeytab; - } - - /** - * Set the kerberosKeytab property: Kerberos keytab secret. - * - * @param kerberosKeytab the kerberosKeytab value to set. - * @return the KerberosKeytabSecrets object itself. - */ - public KerberosKeytabSecrets withKerberosKeytab(String kerberosKeytab) { - this.kerberosKeytab = kerberosKeytab; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.java deleted file mode 100644 index 2210056b5f4d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordCredentials.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The KerberosPasswordCredentials model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("KerberosPassword") -@Fluent -public final class KerberosPasswordCredentials extends DatastoreCredentials { - /* - * [Required] Kerberos password secrets. - */ - @JsonProperty(value = "secrets", required = true) - private KerberosPasswordSecrets secrets; - - /* - * [Required] IP Address or DNS HostName. - */ - @JsonProperty(value = "kerberosKdcAddress", required = true) - private String kerberosKdcAddress; - - /* - * [Required] Kerberos Username - */ - @JsonProperty(value = "kerberosPrincipal", required = true) - private String kerberosPrincipal; - - /* - * [Required] Domain over which a Kerberos authentication server has the - * authority to authenticate a user, host or service. - */ - @JsonProperty(value = "kerberosRealm", required = true) - private String kerberosRealm; - - /** - * Get the secrets property: [Required] Kerberos password secrets. - * - * @return the secrets value. - */ - public KerberosPasswordSecrets secrets() { - return this.secrets; - } - - /** - * Set the secrets property: [Required] Kerberos password secrets. - * - * @param secrets the secrets value to set. - * @return the KerberosPasswordCredentials object itself. - */ - public KerberosPasswordCredentials withSecrets(KerberosPasswordSecrets secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @return the kerberosKdcAddress value. - */ - public String kerberosKdcAddress() { - return this.kerberosKdcAddress; - } - - /** - * Set the kerberosKdcAddress property: [Required] IP Address or DNS HostName. - * - * @param kerberosKdcAddress the kerberosKdcAddress value to set. - * @return the KerberosPasswordCredentials object itself. - */ - public KerberosPasswordCredentials withKerberosKdcAddress(String kerberosKdcAddress) { - this.kerberosKdcAddress = kerberosKdcAddress; - return this; - } - - /** - * Get the kerberosPrincipal property: [Required] Kerberos Username. - * - * @return the kerberosPrincipal value. - */ - public String kerberosPrincipal() { - return this.kerberosPrincipal; - } - - /** - * Set the kerberosPrincipal property: [Required] Kerberos Username. - * - * @param kerberosPrincipal the kerberosPrincipal value to set. - * @return the KerberosPasswordCredentials object itself. - */ - public KerberosPasswordCredentials withKerberosPrincipal(String kerberosPrincipal) { - this.kerberosPrincipal = kerberosPrincipal; - return this; - } - - /** - * Get the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @return the kerberosRealm value. - */ - public String kerberosRealm() { - return this.kerberosRealm; - } - - /** - * Set the kerberosRealm property: [Required] Domain over which a Kerberos authentication server has the authority - * to authenticate a user, host or service. - * - * @param kerberosRealm the kerberosRealm value to set. - * @return the KerberosPasswordCredentials object itself. - */ - public KerberosPasswordCredentials withKerberosRealm(String kerberosRealm) { - this.kerberosRealm = kerberosRealm; - 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model KerberosPasswordCredentials")); - } else { - secrets().validate(); - } - if (kerberosKdcAddress() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosKdcAddress in model KerberosPasswordCredentials")); - } - if (kerberosPrincipal() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosPrincipal in model KerberosPasswordCredentials")); - } - if (kerberosRealm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property kerberosRealm in model KerberosPasswordCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(KerberosPasswordCredentials.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.java deleted file mode 100644 index 487d41bb79659..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KerberosPasswordSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The KerberosPasswordSecrets model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("KerberosPassword") -@Fluent -public final class KerberosPasswordSecrets extends DatastoreSecretsInner { - /* - * Kerberos password secret. - */ - @JsonProperty(value = "kerberosPassword") - private String kerberosPassword; - - /** - * Get the kerberosPassword property: Kerberos password secret. - * - * @return the kerberosPassword value. - */ - public String kerberosPassword() { - return this.kerberosPassword; - } - - /** - * Set the kerberosPassword property: Kerberos password secret. - * - * @param kerberosPassword the kerberosPassword value to set. - * @return the KerberosPasswordSecrets object itself. - */ - public KerberosPasswordSecrets withKerberosPassword(String kerberosPassword) { - this.kerberosPassword = kerberosPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 35e1ecae20e8f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a KeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyType. - */ - @JsonCreator - 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 e2733f2bbdd8a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A Machine Learning compute based on Kubernetes Compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("Kubernetes") -@Fluent -public final class Kubernetes extends Compute { - /* - * Properties of Kubernetes - */ - @JsonProperty(value = "properties") - private KubernetesProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 01e573a78520e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Properties specific to a KubernetesOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Kubernetes") -@Fluent -public final class KubernetesOnlineDeployment extends OnlineDeploymentDetails { - /* - * The resource requirements for the container (cpu and memory). - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /** - * 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; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { - super.withLivenessProbe(livenessProbe); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withModel(String model) { - super.withModel(model); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withPrivateNetworkConnection(Boolean privateNetworkConnection) { - super.withPrivateNetworkConnection(privateNetworkConnection); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment withDescription(String description) { - super.withDescription(description); - 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; - } - - /** {@inheritDoc} */ - @Override - public KubernetesOnlineDeployment 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 (containerResourceRequirements() != null) { - containerResourceRequirements().validate(); - } - } -} 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 a24aab918d112..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Kubernetes properties. */ -@Fluent -public final class KubernetesProperties { - /* - * Relay connection string. - */ - @JsonProperty(value = "relayConnectionString") - private String relayConnectionString; - - /* - * ServiceBus connection string. - */ - @JsonProperty(value = "serviceBusConnectionString") - private String serviceBusConnectionString; - - /* - * Extension principal-id. - */ - @JsonProperty(value = "extensionPrincipalId") - private String extensionPrincipalId; - - /* - * Extension instance release train. - */ - @JsonProperty(value = "extensionInstanceReleaseTrain") - private String extensionInstanceReleaseTrain; - - /* - * VC name. - */ - @JsonProperty(value = "vcName") - private String vcName; - - /* - * Compute namespace - */ - @JsonProperty(value = "namespace") - private String namespace; - - /* - * Default instance type - */ - @JsonProperty(value = "defaultInstanceType") - private String defaultInstanceType; - - /* - * Instance Type Schema - */ - @JsonProperty(value = "instanceTypes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map instanceTypes; - - /** - * 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(); - } - }); - } - } -} 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 b2f81c3e01786..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Kubernetes Compute Schema. */ -@Fluent -public class KubernetesSchema { - /* - * Properties of Kubernetes - */ - @JsonProperty(value = "properties") - private KubernetesProperties properties; - - /** - * 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(); - } - } -} 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 7c23f49432ff7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LearningRateScheduler. */ -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 or finds a LearningRateScheduler from its string representation. - * - * @param name a name to look for. - * @return the corresponding LearningRateScheduler. - */ - @JsonCreator - 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 734a5f698344f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.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.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Aml user feature operation response. */ -@Immutable -public final class ListAmlUserFeatureResult { - /* - * The list of AML user facing features. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * 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()); - } - } -} 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 7ee8bc352a961..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListNotebookKeysResult.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.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 53a4f6c3e392d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListStorageAccountKeysResult.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.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 20d35a418ec86..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.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.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List Usages operation response. */ -@Immutable -public final class ListUsagesResult { - /* - * The list of AML resource usages. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * 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()); - } - } -} 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 1e7442c2b4dfa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a ListViewType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ListViewType. - */ - @JsonCreator - 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 37ea530b96fb2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceKeysResult.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.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 189878d1d5fb9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.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.annotation.Immutable; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The List WorkspaceQuotasByVMFamily operation response. */ -@Immutable -public final class ListWorkspaceQuotas { - /* - * The list of Workspace Quotas by VM Family - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - 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. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** - * 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()); - } - } -} 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 1a6ba7478d16b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Literal input type. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("Literal") -@Fluent -public final class LiteralJobInput extends JobInput { - /* - * [Required] Literal value for the input. - */ - @JsonProperty(value = "value", required = true) - private String value; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model LiteralJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LiteralJobInput.class); -} 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 fae29e9810e1a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LoadBalancerType. */ -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 or finds a LoadBalancerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerType. - */ - @JsonCreator - 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 31deaf258b80c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for LogVerbosity. */ -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 or finds a LogVerbosity from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogVerbosity. - */ - @JsonCreator - 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 c7348c7fb7554..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The MLFlowModelJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("MLFlowModel") -@Fluent -public final class MLFlowModelJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model MLFlowModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLFlowModelJobInput.class); -} 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 826b8d43d63aa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The MLFlowModelJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("MLFlowModel") -@Fluent -public final class MLFlowModelJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 6b0f9ed108f8e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; -import java.util.Map; - -/** MLTable data definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("MLTable") -@Fluent -public final class MLTableData extends DataVersionBaseDetails { - /* - * Uris referenced in the MLTable definition (required for lineage) - */ - @JsonProperty(value = "referencedUris") - private List referencedUris; - - /** - * 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 withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLTableData withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLTableData withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLTableData withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public MLTableData 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(); - } -} 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 fc727a6412a7c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The MLTableJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("MLTable") -@Fluent -public final class MLTableJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model MLTableJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(MLTableJobInput.class); -} 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 d3e0e4016825a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The MLTableJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("MLTable") -@Fluent -public final class MLTableJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 b2043af3eaf43..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.UUID; - -/** Managed identity configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") -@JsonTypeName("Managed") -@Fluent -public class ManagedIdentity extends IdentityConfiguration { - /* - * Specifies a user-assigned identity by client ID. For system-assigned, do - * not set this field. - */ - @JsonProperty(value = "clientId") - private UUID clientId; - - /* - * Specifies a user-assigned identity by object ID. For system-assigned, do - * not set this field. - */ - @JsonProperty(value = "objectId") - private UUID objectId; - - /* - * Specifies a user-assigned identity by ARM resource ID. For - * system-assigned, do not set this field. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /** - * 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(); - } -} 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 369fafc05b950..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.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.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Properties specific to a ManagedOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Managed") -@Fluent -public final class ManagedOnlineDeployment extends OnlineDeploymentDetails { - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withAppInsightsEnabled(Boolean appInsightsEnabled) { - super.withAppInsightsEnabled(appInsightsEnabled); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { - super.withEgressPublicNetworkAccess(egressPublicNetworkAccess); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withLivenessProbe(ProbeSettings livenessProbe) { - super.withLivenessProbe(livenessProbe); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withModel(String model) { - super.withModel(model); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withModelMountPath(String modelMountPath) { - super.withModelMountPath(modelMountPath); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withPrivateNetworkConnection(Boolean privateNetworkConnection) { - super.withPrivateNetworkConnection(privateNetworkConnection); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withReadinessProbe(ProbeSettings readinessProbe) { - super.withReadinessProbe(readinessProbe); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withRequestSettings(OnlineRequestSettings requestSettings) { - super.withRequestSettings(requestSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withScaleSettings(OnlineScaleSettings scaleSettings) { - super.withScaleSettings(scaleSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment withDescription(String description) { - super.withDescription(description); - 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; - } - - /** {@inheritDoc} */ - @Override - public ManagedOnlineDeployment 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(); - } -} 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 c31c18ce491e3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; -import java.util.UUID; - -/** Managed service identity (system assigned and/or user assigned identities). */ -@Fluent -public class ManagedServiceIdentity { - /* - * The service principal ID of the system assigned identity. This property - * will only be provided for a system assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - */ - @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) - private UUID tenantId; - - /* - * Type of managed service identity (where both SystemAssigned and - * UserAssigned types are allowed). - */ - @JsonProperty(value = "type", required = true) - private ManagedServiceIdentityType type; - - /* - * The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the - * form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map userAssignedIdentities; - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); -} diff --git a/sdk/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 6fc06446cb0d6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ManagedServiceIdentityType. */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** Static value SystemAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - @JsonCreator - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/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 49a52d574f6ba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines an early termination policy based on running averages of the primary metric of all runs. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") -@JsonTypeName("MedianStopping") -@Fluent -public final class MedianStoppingPolicy extends EarlyTerminationPolicy { - /** {@inheritDoc} */ - @Override - public MedianStoppingPolicy withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** {@inheritDoc} */ - @Override - public MedianStoppingPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.java deleted file mode 100644 index abc45b75dc2c4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; - -/** An immutable client-side representation of ModelContainerData. */ -public interface ModelContainerData { - /** - * 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. - */ - ModelContainerDetails 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.ModelContainerDataInner object. - * - * @return the inner object. - */ - ModelContainerDataInner innerModel(); - - /** The entirety of the ModelContainerData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ModelContainerData definition stages. */ - interface DefinitionStages { - /** The first stage of the ModelContainerData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ModelContainerData 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 ModelContainerData 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(ModelContainerDetails properties); - } - /** - * The stage of the ModelContainerData 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. - */ - ModelContainerData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelContainerData create(Context context); - } - } - /** - * Begins update for the ModelContainerData resource. - * - * @return the stage of resource update. - */ - ModelContainerData.Update update(); - - /** The template for ModelContainerData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelContainerData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelContainerData apply(Context context); - } - /** The ModelContainerData update stages. */ - interface UpdateStages { - /** The stage of the ModelContainerData 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(ModelContainerDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelContainerData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelContainerData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.java deleted file mode 100644 index 20fcd6820c0fb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerDetails.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.models; - -import com.azure.core.annotation.Fluent; -import java.util.Map; - -/** The ModelContainerDetails model. */ -@Fluent -public final class ModelContainerDetails extends AssetContainer { - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerDetails 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(); - } -} 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 adf8b64de64a0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of ModelContainer entities. */ -@Fluent -public final class ModelContainerResourceArmPaginatedResult { - /* - * The link to the next page of ModelContainer objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type ModelContainer. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 c629ea65fcaea..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainers.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - Response deleteWithResponse(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. - */ - ModelContainerData get(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 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}. - */ - ModelContainerData 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 ModelContainerData resource. - * - * @param name resource name. - * @return the first stage of the new ModelContainerData definition. - */ - ModelContainerData.DefinitionStages.Blank define(String name); -} 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 957999f455e66..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ModelSize. */ -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 or finds a ModelSize from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelSize. - */ - @JsonCreator - 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/ModelType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelType.java deleted file mode 100644 index 457991e34222f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ModelType. */ -public final class ModelType extends ExpandableStringEnum { - /** Static value CustomModel for ModelType. */ - public static final ModelType CUSTOM_MODEL = fromString("CustomModel"); - - /** Static value MLFlowModel for ModelType. */ - public static final ModelType MLFLOW_MODEL = fromString("MLFlowModel"); - - /** Static value TritonModel for ModelType. */ - public static final ModelType TRITON_MODEL = fromString("TritonModel"); - - /** - * Creates or finds a ModelType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelType. - */ - @JsonCreator - public static ModelType fromString(String name) { - return fromString(name, ModelType.class); - } - - /** - * Gets known ModelType values. - * - * @return known ModelType values. - */ - public static Collection values() { - return values(ModelType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.java deleted file mode 100644 index 8b3a0b2871a1b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionData.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; - -/** An immutable client-side representation of ModelVersionData. */ -public interface ModelVersionData { - /** - * 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. - */ - ModelVersionDetails 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.ModelVersionDataInner object. - * - * @return the inner object. - */ - ModelVersionDataInner innerModel(); - - /** The entirety of the ModelVersionData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ModelVersionData definition stages. */ - interface DefinitionStages { - /** The first stage of the ModelVersionData definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ModelVersionData 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 ModelVersionData 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(ModelVersionDetails properties); - } - /** - * The stage of the ModelVersionData 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. - */ - ModelVersionData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelVersionData create(Context context); - } - } - /** - * Begins update for the ModelVersionData resource. - * - * @return the stage of resource update. - */ - ModelVersionData.Update update(); - - /** The template for ModelVersionData update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelVersionData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelVersionData apply(Context context); - } - /** The ModelVersionData update stages. */ - interface UpdateStages { - /** The stage of the ModelVersionData 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(ModelVersionDetails properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelVersionData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelVersionData refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.java deleted file mode 100644 index 9da6e6feee08e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionDetails.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Model asset version details. */ -@Fluent -public final class ModelVersionDetails extends AssetBase { - /* - * Mapping of model flavors to their properties. - */ - @JsonProperty(value = "flavors") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map flavors; - - /* - * Name of the training job which produced this model - */ - @JsonProperty(value = "jobName") - private String jobName; - - /* - * The storage format for this entity. Used for NCD. - */ - @JsonProperty(value = "modelType") - private ModelType modelType; - - /* - * The URI path to the model contents. - */ - @JsonProperty(value = "modelUri") - private String modelUri; - - /** - * 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 ModelVersionDetails object itself. - */ - public ModelVersionDetails withFlavors(Map flavors) { - this.flavors = flavors; - 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 ModelVersionDetails object itself. - */ - public ModelVersionDetails withJobName(String jobName) { - this.jobName = jobName; - return this; - } - - /** - * Get the modelType property: The storage format for this entity. Used for NCD. - * - * @return the modelType value. - */ - public ModelType 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 ModelVersionDetails object itself. - */ - public ModelVersionDetails withModelType(ModelType 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 ModelVersionDetails object itself. - */ - public ModelVersionDetails withModelUri(String modelUri) { - this.modelUri = modelUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionDetails withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionDetails withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionDetails withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionDetails 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 (flavors() != null) { - flavors() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} 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 eeefe6c1d55e3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of ModelVersion entities. */ -@Fluent -public final class ModelVersionResourceArmPaginatedResult { - /* - * The link to the next page of ModelVersion objects. If null, there are no - * additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type ModelVersion. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 01f803ff77346..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersions.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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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. - * @return the {@link Response}. - */ - Response deleteWithResponse( - 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. - */ - ModelVersionData get(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 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}. - */ - ModelVersionData 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 ModelVersionData resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersionData definition. - */ - ModelVersionData.DefinitionStages.Blank define(String name); -} 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 6b85260ad0793..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MountAction. */ -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 or finds a MountAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountAction. - */ - @JsonCreator - 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 17b2a95004ad7..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for MountState. */ -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 or finds a MountState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountState. - */ - @JsonCreator - 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 b10ee3e5d4244..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** MPI distribution configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") -@JsonTypeName("Mpi") -@Fluent -public final class Mpi extends DistributionConfiguration { - /* - * Number of processes per MPI node. - */ - @JsonProperty(value = "processCountPerInstance") - private Integer processCountPerInstance; - - /** - * 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(); - } -} 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 5aa4f443b6679..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** N-Cross validations value. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "mode", - defaultImpl = NCrossValidations.class) -@JsonTypeName("NCrossValidations") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Auto", value = AutoNCrossValidations.class), - @JsonSubTypes.Type(name = "Custom", value = CustomNCrossValidations.class) -}) -@Immutable -public class NCrossValidations { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 74d8949c003f4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for NCrossValidationsMode. */ -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 or finds a NCrossValidationsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NCrossValidationsMode. - */ - @JsonCreator - 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 d1d98fcb349a2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Network. */ -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 or finds a Network from its string representation. - * - * @param name a name to look for. - * @return the corresponding Network. - */ - @JsonCreator - 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 06d7e7163e891..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. */ -@Fluent -public class NlpVertical { - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalDataSettings.java deleted file mode 100644 index a8541602826ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalDataSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Class for data inputs. NLP - Natural Language Processing. */ -@Fluent -public final class NlpVerticalDataSettings extends DataSettings { - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private NlpVerticalValidationDataSettings validationData; - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public NlpVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the NlpVerticalDataSettings object itself. - */ - public NlpVerticalDataSettings withValidationData(NlpVerticalValidationDataSettings validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} 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 077a1060349ac..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.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.core.annotation.Fluent; - -/** The NlpVerticalFeaturizationSettings model. */ -@Fluent -public final class NlpVerticalFeaturizationSettings extends FeaturizationSettings { - /** {@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(); - } -} 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 9f7214537ae02..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Job execution constraints. */ -@Fluent -public final class NlpVerticalLimitSettings { - /* - * Maximum Concurrent AutoML iterations. - */ - @JsonProperty(value = "maxConcurrentTrials") - private Integer maxConcurrentTrials; - - /* - * Number of AutoML iterations. - */ - @JsonProperty(value = "maxTrials") - private Integer maxTrials; - - /* - * AutoML job timeout. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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; - } - - /** - * 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.java deleted file mode 100644 index 83a16977dc67b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalValidationDataSettings.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.annotation.Fluent; - -/** The NlpVerticalValidationDataSettings model. */ -@Fluent -public final class NlpVerticalValidationDataSettings extends ValidationDataSettings { - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalValidationDataSettings 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(); - } -} 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 550b074c0ea46..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for NodeState. */ -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 or finds a NodeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeState. - */ - @JsonCreator - 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 d2c75d39b07e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.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.fasterxml.jackson.annotation.JsonProperty; - -/** Counts of various compute node states on the amlCompute. */ -@Immutable -public final class NodeStateCounts { - /* - * Idle node count. Number of compute nodes in idle state. - */ - @JsonProperty(value = "idleNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer idleNodeCount; - - /* - * Running node count. Number of compute nodes which are running jobs. - */ - @JsonProperty(value = "runningNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer runningNodeCount; - - /* - * Preparing node count. Number of compute nodes which are being prepared. - */ - @JsonProperty(value = "preparingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer preparingNodeCount; - - /* - * Unusable node count. Number of compute nodes which are in unusable - * state. - */ - @JsonProperty(value = "unusableNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer unusableNodeCount; - - /* - * Leaving node count. Number of compute nodes which are leaving the - * amlCompute. - */ - @JsonProperty(value = "leavingNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer leavingNodeCount; - - /* - * Preempted node count. Number of compute nodes which are in preempted - * state. - */ - @JsonProperty(value = "preemptedNodeCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer preemptedNodeCount; - - /** - * Get the idleNodeCount property: Idle node count. Number of compute nodes in idle state. - * - * @return the idleNodeCount value. - */ - public Integer idleNodeCount() { - return this.idleNodeCount; - } - - /** - * Get the runningNodeCount property: Running node count. Number of compute nodes which are running jobs. - * - * @return the runningNodeCount value. - */ - public Integer runningNodeCount() { - return this.runningNodeCount; - } - - /** - * Get the preparingNodeCount property: Preparing node count. Number of compute nodes which are being prepared. - * - * @return the preparingNodeCount value. - */ - public Integer preparingNodeCount() { - return this.preparingNodeCount; - } - - /** - * Get the unusableNodeCount property: Unusable node count. Number of compute nodes which are in unusable state. - * - * @return the unusableNodeCount value. - */ - public Integer unusableNodeCount() { - return this.unusableNodeCount; - } - - /** - * Get the leavingNodeCount property: Leaving node count. Number of compute nodes which are leaving the amlCompute. - * - * @return the leavingNodeCount value. - */ - public Integer leavingNodeCount() { - return this.leavingNodeCount; - } - - /** - * Get the preemptedNodeCount property: Preempted node count. 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() { - } -} 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 1f3152fd57556..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Empty/none datastore credentials. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("None") -@Immutable -public final class NoneDatastoreCredentials extends DatastoreCredentials { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 4e28342a32c7d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookAccessTokenResult.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.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 13ca2f4c85f5b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The NotebookPreparationError model. */ -@Fluent -public final class NotebookPreparationError { - /* - * The errorMessage property. - */ - @JsonProperty(value = "errorMessage") - private String errorMessage; - - /* - * The statusCode property. - */ - @JsonProperty(value = "statusCode") - private Integer statusCode; - - /** - * 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() { - } -} 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 f8aa5bb01e786..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookResourceInfo.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.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/ObjectDetectionPrimaryMetrics.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.java deleted file mode 100644 index 6f03bf08a710f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ObjectDetectionPrimaryMetrics. */ -public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. */ - public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates or finds a ObjectDetectionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ObjectDetectionPrimaryMetrics. - */ - @JsonCreator - 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 2edf9faeb460f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Optimization objective. */ -@Fluent -public final class Objective { - /* - * [Required] Defines supported metric goals for hyperparameter tuning - */ - @JsonProperty(value = "goal", required = true) - private Goal goal; - - /* - * [Required] Name of the metric to optimize. - */ - @JsonProperty(value = "primaryMetric", required = true) - private String primaryMetric; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (goal() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property goal in model Objective")); - } - if (primaryMetric() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property primaryMetric in model Objective")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Objective.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentData.java deleted file mode 100644 index d8007d460272d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentData.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.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.OnlineDeploymentDataInner; -import java.util.Map; - -/** An immutable client-side representation of OnlineDeploymentData. */ -public interface OnlineDeploymentData { - /** - * 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 properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - OnlineDeploymentDetails properties(); - - /** - * 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.OnlineDeploymentDataInner object. - * - * @return the inner object. - */ - OnlineDeploymentDataInner innerModel(); - - /** The entirety of the OnlineDeploymentData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The OnlineDeploymentData definition stages. */ - interface DefinitionStages { - /** The first stage of the OnlineDeploymentData definition. */ - interface Blank extends WithLocation { - } - /** The stage of the OnlineDeploymentData 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 OnlineDeploymentData 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 OnlineDeploymentData 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(OnlineDeploymentDetails properties); - } - /** - * The stage of the OnlineDeploymentData 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineDeploymentData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineDeploymentData create(Context context); - } - /** The stage of the OnlineDeploymentData 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 OnlineDeploymentData 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 OnlineDeploymentData 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 OnlineDeploymentData 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 OnlineDeploymentData resource. - * - * @return the stage of resource update. - */ - OnlineDeploymentData.Update update(); - - /** The template for OnlineDeploymentData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineDeploymentData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineDeploymentData apply(Context context); - } - /** The OnlineDeploymentData update stages. */ - interface UpdateStages { - /** The stage of the OnlineDeploymentData 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 OnlineDeploymentData 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); - } - /** The stage of the OnlineDeploymentData update 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. - */ - Update withKind(String kind); - } - /** The stage of the OnlineDeploymentData 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(PartialOnlineDeployment properties); - } - /** The stage of the OnlineDeploymentData 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. - */ - OnlineDeploymentData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineDeploymentData refresh(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); - - /** - * 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); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java deleted file mode 100644 index d8bf089ea113c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentDetails.java +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** The OnlineDeploymentDetails model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "endpointComputeType", - defaultImpl = OnlineDeploymentDetails.class) -@JsonTypeName("OnlineDeploymentDetails") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Kubernetes", value = KubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) -}) -@Fluent -public class OnlineDeploymentDetails extends EndpointDeploymentPropertiesBase { - /* - * If true, enables Application Insights logging. - */ - @JsonProperty(value = "appInsightsEnabled") - private Boolean appInsightsEnabled; - - /* - * If Enabled, allow egress public network access. If Disabled, this will - * create secure egress. Default: Enabled. - */ - @JsonProperty(value = "egressPublicNetworkAccess") - private EgressPublicNetworkAccessType egressPublicNetworkAccess; - - /* - * Compute instance type. - */ - @JsonProperty(value = "instanceType") - private String instanceType; - - /* - * Liveness probe monitors the health of the container regularly. - */ - @JsonProperty(value = "livenessProbe") - private ProbeSettings livenessProbe; - - /* - * The URI path to the model. - */ - @JsonProperty(value = "model") - private String model; - - /* - * The path to mount the model in custom container. - */ - @JsonProperty(value = "modelMountPath") - private String modelMountPath; - - /* - * If true, enable private network connection. - * DEPRECATED for future API versions. Use EgressPublicNetworkAccess. - */ - @JsonProperty(value = "privateNetworkConnection") - private Boolean privateNetworkConnection; - - /* - * Provisioning state for the endpoint deployment. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private DeploymentProvisioningState provisioningState; - - /* - * Readiness probe validates if the container is ready to serve traffic. - * The properties and defaults are the same as liveness probe. - */ - @JsonProperty(value = "readinessProbe") - private ProbeSettings readinessProbe; - - /* - * Request settings for the deployment. - */ - @JsonProperty(value = "requestSettings") - private OnlineRequestSettings requestSettings; - - /* - * Scale settings for the deployment. - * If it is null or not provided, - * it defaults to TargetUtilizationScaleSettings for - * KubernetesOnlineDeployment - * and to DefaultScaleSettings for ManagedOnlineDeployment. - */ - @JsonProperty(value = "scaleSettings") - private OnlineScaleSettings scaleSettings; - - /** - * 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { - this.egressPublicNetworkAccess = egressPublicNetworkAccess; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withInstanceType(String instanceType) { - this.instanceType = instanceType; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withLivenessProbe(ProbeSettings livenessProbe) { - this.livenessProbe = livenessProbe; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withModel(String model) { - this.model = model; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withModelMountPath(String modelMountPath) { - this.modelMountPath = modelMountPath; - return this; - } - - /** - * Get the privateNetworkConnection property: If true, enable private network connection. DEPRECATED for future API - * versions. Use EgressPublicNetworkAccess. - * - * @return the privateNetworkConnection value. - */ - public Boolean privateNetworkConnection() { - return this.privateNetworkConnection; - } - - /** - * Set the privateNetworkConnection property: If true, enable private network connection. DEPRECATED for future API - * versions. Use EgressPublicNetworkAccess. - * - * @param privateNetworkConnection the privateNetworkConnection value to set. - * @return the OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withPrivateNetworkConnection(Boolean privateNetworkConnection) { - this.privateNetworkConnection = privateNetworkConnection; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint deployment. - * - * @return the provisioningState value. - */ - public DeploymentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withReadinessProbe(ProbeSettings readinessProbe) { - this.readinessProbe = readinessProbe; - 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withRequestSettings(OnlineRequestSettings requestSettings) { - this.requestSettings = requestSettings; - return this; - } - - /** - * 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 OnlineDeploymentDetails object itself. - */ - public OnlineDeploymentDetails withScaleSettings(OnlineScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDetails withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDetails withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDetails withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentDetails 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 (livenessProbe() != null) { - livenessProbe().validate(); - } - if (readinessProbe() != null) { - readinessProbe().validate(); - } - if (requestSettings() != null) { - requestSettings().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } -} 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 7f21e01700a77..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of OnlineDeployment entities. */ -@Fluent -public final class OnlineDeploymentTrackedResourceArmPaginatedResult { - /* - * The link to the next page of OnlineDeployment objects. If null, there - * are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type OnlineDeployment. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 375af4784d668..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - OnlineDeploymentData get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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}. - */ - OnlineDeploymentData 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 OnlineDeploymentData resource. - * - * @param name resource name. - * @return the first stage of the new OnlineDeploymentData definition. - */ - OnlineDeploymentData.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java deleted file mode 100644 index 5cb8231f3265c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointData.java +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.OnlineEndpointDataInner; -import java.util.Map; - -/** An immutable client-side representation of OnlineEndpointData. */ -public interface OnlineEndpointData { - /** - * 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 properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - OnlineEndpointDetails properties(); - - /** - * 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.OnlineEndpointDataInner object. - * - * @return the inner object. - */ - OnlineEndpointDataInner innerModel(); - - /** The entirety of the OnlineEndpointData definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The OnlineEndpointData definition stages. */ - interface DefinitionStages { - /** The first stage of the OnlineEndpointData definition. */ - interface Blank extends WithLocation { - } - /** The stage of the OnlineEndpointData 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 OnlineEndpointData 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 OnlineEndpointData 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(OnlineEndpointDetails properties); - } - /** - * The stage of the OnlineEndpointData 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineEndpointData create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineEndpointData create(Context context); - } - /** The stage of the OnlineEndpointData 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 OnlineEndpointData 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 OnlineEndpointData 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 OnlineEndpointData 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 OnlineEndpointData resource. - * - * @return the stage of resource update. - */ - OnlineEndpointData.Update update(); - - /** The template for OnlineEndpointData update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithIdentity, - UpdateStages.WithKind, - UpdateStages.WithProperties, - UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineEndpointData apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineEndpointData apply(Context context); - } - /** The OnlineEndpointData update stages. */ - interface UpdateStages { - /** The stage of the OnlineEndpointData 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 OnlineEndpointData 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); - } - /** The stage of the OnlineEndpointData update 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. - */ - Update withKind(String kind); - } - /** The stage of the OnlineEndpointData 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(PartialOnlineEndpoint properties); - } - /** The stage of the OnlineEndpointData 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. - */ - OnlineEndpointData refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineEndpointData refresh(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(); - - /** - * 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); - - /** - * 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 AAD 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(); - - /** - * Retrieve a valid AAD 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); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.java deleted file mode 100644 index 0a1fe192ca99a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointDetails.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.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointPropertiesBaseInner; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Online endpoint configuration. */ -@Fluent -public final class OnlineEndpointDetails extends EndpointPropertiesBaseInner { - /* - * ARM resource ID of the compute if it exists. - * optional - */ - @JsonProperty(value = "compute") - private String compute; - - /* - * Percentage of traffic to be mirrored to each deployment without using - * returned scoring. Traffic values need to sum to utmost 50. - */ - @JsonProperty(value = "mirrorTraffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map mirrorTraffic; - - /* - * Provisioning state for the endpoint. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private EndpointProvisioningState provisioningState; - - /* - * Set to "Enabled" for endpoints that should allow public access when - * Private Link is enabled. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccessType publicNetworkAccess; - - /* - * Percentage of traffic from endpoint to divert to each deployment. - * Traffic values need to sum to 100. - */ - @JsonProperty(value = "traffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map traffic; - - /** - * 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 OnlineEndpointDetails object itself. - */ - public OnlineEndpointDetails withCompute(String compute) { - this.compute = compute; - 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 OnlineEndpointDetails object itself. - */ - public OnlineEndpointDetails withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * 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 OnlineEndpointDetails object itself. - */ - public OnlineEndpointDetails 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 OnlineEndpointDetails object itself. - */ - public OnlineEndpointDetails withTraffic(Map traffic) { - this.traffic = traffic; - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDetails withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDetails withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDetails withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointDetails 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(); - } -} 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 25853197fcefe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointDataInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of OnlineEndpoint entities. */ -@Fluent -public final class OnlineEndpointTrackedResourceArmPaginatedResult { - /* - * The link to the next page of OnlineEndpoint objects. If null, there are - * no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type OnlineEndpoint. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 0ee0b7d4d5648..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoints.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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. - */ - OnlineEndpointData get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 AAD 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); - - /** - * Retrieve a valid AAD 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); - - /** - * 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}. - */ - OnlineEndpointData 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 OnlineEndpointData resource. - * - * @param name resource name. - * @return the first stage of the new OnlineEndpointData definition. - */ - OnlineEndpointData.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 e5922f656be8f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Online deployment scoring requests configuration. */ -@Fluent -public final class OnlineRequestSettings { - /* - * The number of maximum concurrent requests per node allowed per - * deployment. Defaults to 1. - */ - @JsonProperty(value = "maxConcurrentRequestsPerInstance") - private Integer maxConcurrentRequestsPerInstance; - - /* - * The maximum amount of time a request will stay in the queue in ISO 8601 - * format. - * Defaults to 500ms. - */ - @JsonProperty(value = "maxQueueWait") - private Duration maxQueueWait; - - /* - * The scoring timeout in ISO 8601 format. - * Defaults to 5000ms. - */ - @JsonProperty(value = "requestTimeout") - private Duration requestTimeout; - - /** - * 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; - } - - /** - * Get the maxQueueWait property: The maximum amount of time a request will stay in the queue in ISO 8601 format. - * Defaults to 500ms. - * - * @return the maxQueueWait value. - */ - public Duration maxQueueWait() { - return this.maxQueueWait; - } - - /** - * Set the maxQueueWait property: The maximum amount of time a request will stay in the queue in ISO 8601 format. - * Defaults to 500ms. - * - * @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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 60334eea6b62e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Online deployment scaling configuration. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "scaleType", - defaultImpl = OnlineScaleSettings.class) -@JsonTypeName("OnlineScaleSettings") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Default", value = DefaultScaleSettings.class), - @JsonSubTypes.Type(name = "TargetUtilization", value = TargetUtilizationScaleSettings.class) -}) -@Immutable -public class OnlineScaleSettings { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 544a3dfe9094c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperatingSystemType. */ -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 or finds a OperatingSystemType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperatingSystemType. - */ - @JsonCreator - 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/OperationName.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.java deleted file mode 100644 index dd28866ba0abe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperationName. */ -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 or finds a OperationName from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationName. - */ - @JsonCreator - 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 055e4bab127c6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperationStatus. */ -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 or finds a OperationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationStatus. - */ - @JsonCreator - 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 09f86acd5ac27..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OperationTrigger. */ -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 or finds a OperationTrigger from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationTrigger. - */ - @JsonCreator - 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 d718ecc7e6d5b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Operations.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 an array of operations supported by the 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 an array of operations supported by the 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 80acc20dc3e1a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a OrderString from its string representation. - * - * @param name a name to look for. - * @return the corresponding OrderString. - */ - @JsonCreator - 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/OsType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.java deleted file mode 100644 index 34f1e0c661dd0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OsType. */ -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 or finds a OsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OsType. - */ - @JsonCreator - 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/OutputDeliveryMode.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.java deleted file mode 100644 index 3bb10862ed2b5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for OutputDeliveryMode. */ -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"); - - /** - * Creates or finds a OutputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputDeliveryMode. - */ - @JsonCreator - 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 6227eee167376..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a job output. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("OutputPath") -@Fluent -public final class OutputPathAssetReference extends AssetReferenceBase { - /* - * ARM resource ID of the job. - */ - @JsonProperty(value = "jobId") - private String jobId; - - /* - * The path of the file/directory in the job output. - */ - @JsonProperty(value = "path") - private String path; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 75156ffb6df7c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.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.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Machine Learning compute objects wrapped in ARM resource envelope. */ -@Fluent -public final class PaginatedComputeResourcesList { - /* - * An array of Machine Learning compute objects wrapped in ARM resource - * envelope. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * 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()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.java deleted file mode 100644 index 91bcd2c2cfd8d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedWorkspaceConnectionsList.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Paginated list of Workspace connection objects. */ -@Fluent -public final class PaginatedWorkspaceConnectionsList { - /* - * An array of Workspace connection objects. - */ - @JsonProperty(value = "value") - private List value; - - /* - * A continuation link (absolute URI) to the next page of results in the - * list. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * Get the value property: An array of Workspace connection objects. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Workspace connection objects. - * - * @param value the value value to set. - * @return the PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList 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 PaginatedWorkspaceConnectionsList object itself. - */ - public PaginatedWorkspaceConnectionsList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.java deleted file mode 100644 index 030c087c98c9c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialAssetReferenceBase.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Base definition for asset references. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "referenceType", - defaultImpl = PartialAssetReferenceBase.class) -@JsonTypeName("PartialAssetReferenceBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "DataPath", value = PartialDataPathAssetReference.class), - @JsonSubTypes.Type(name = "Id", value = PartialIdAssetReference.class), - @JsonSubTypes.Type(name = "OutputPath", value = PartialOutputPathAssetReference.class) -}) -@Immutable -public class PartialAssetReferenceBase { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 7f3588eac7d41..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.java +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Mutable batch inference settings per deployment. */ -@Fluent -public final class PartialBatchDeployment { - /* - * Code configuration for the endpoint deployment. - */ - @JsonProperty(value = "codeConfiguration") - private PartialCodeConfiguration codeConfiguration; - - /* - * Compute binding definition. - */ - @JsonProperty(value = "compute") - private String compute; - - /* - * Description of the endpoint deployment. - */ - @JsonProperty(value = "description") - private String description; - - /* - * ARM resource ID of the environment specification for the endpoint - * deployment. - */ - @JsonProperty(value = "environmentId") - private String environmentId; - - /* - * Environment variables configuration for the deployment. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * 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. - */ - @JsonProperty(value = "errorThreshold") - private Integer errorThreshold; - - /* - * Logging level for batch inference operation. - */ - @JsonProperty(value = "loggingLevel") - private BatchLoggingLevel loggingLevel; - - /* - * Indicates number of processes per instance - */ - @JsonProperty(value = "maxConcurrencyPerInstance") - private Integer maxConcurrencyPerInstance; - - /* - * 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. - */ - @JsonProperty(value = "miniBatchSize") - private Long miniBatchSize; - - /* - * Reference to the model asset for the endpoint deployment. - */ - @JsonProperty(value = "model") - private PartialAssetReferenceBase model; - - /* - * Indicates how the output will be organized. - */ - @JsonProperty(value = "outputAction") - private BatchOutputAction outputAction; - - /* - * Customized output file name for append_row output action. - */ - @JsonProperty(value = "outputFileName") - private String outputFileName; - - /* - * Property dictionary. Properties can be added, but not removed or - * altered. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /* - * Retry Settings for the batch inference operation. - */ - @JsonProperty(value = "retrySettings") - private PartialBatchRetrySettings retrySettings; - - /** - * Get the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @return the codeConfiguration value. - */ - public PartialCodeConfiguration codeConfiguration() { - return this.codeConfiguration; - } - - /** - * Set the codeConfiguration property: Code configuration for the endpoint deployment. - * - * @param codeConfiguration the codeConfiguration value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withCodeConfiguration(PartialCodeConfiguration codeConfiguration) { - this.codeConfiguration = codeConfiguration; - return this; - } - - /** - * Get the compute property: Compute binding definition. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: Compute binding definition. - * - * @param compute the compute value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withCompute(String compute) { - this.compute = compute; - return this; - } - - /** - * 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; - } - - /** - * Get the environmentId property: ARM resource ID 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 of the environment specification for the endpoint deployment. - * - * @param environmentId the environmentId value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withErrorThreshold(Integer errorThreshold) { - this.errorThreshold = errorThreshold; - 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; - return this; - } - - /** - * Get the maxConcurrencyPerInstance property: Indicates number of processes per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates number of processes per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; - return this; - } - - /** - * Get the model property: Reference to the model asset for the endpoint deployment. - * - * @return the model value. - */ - public PartialAssetReferenceBase 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withModel(PartialAssetReferenceBase model) { - this.model = model; - 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - 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 PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Get the retrySettings property: Retry Settings for the batch inference operation. - * - * @return the retrySettings value. - */ - public PartialBatchRetrySettings retrySettings() { - return this.retrySettings; - } - - /** - * Set the retrySettings property: Retry Settings for the batch inference operation. - * - * @param retrySettings the retrySettings value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withRetrySettings(PartialBatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (codeConfiguration() != null) { - codeConfiguration().validate(); - } - if (model() != null) { - model().validate(); - } - if (retrySettings() != null) { - retrySettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialTrackedResource.java deleted file mode 100644 index 3dfbe96a2c64e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialTrackedResource.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialBatchDeploymentPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialBatchDeployment properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * 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 PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withIdentity(PartialManagedServiceIdentity 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 PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * 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 PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource withProperties(PartialBatchDeployment properties) { - this.properties = properties; - 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 PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource 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 PartialBatchDeploymentPartialTrackedResource object itself. - */ - public PartialBatchDeploymentPartialTrackedResource 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 (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.java deleted file mode 100644 index 5fbe738f6cb24..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpoint.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Mutable Batch endpoint configuration. */ -@Fluent -public final class PartialBatchEndpoint { - /* - * Default values for Batch Endpoint - */ - @JsonProperty(value = "defaults") - private BatchEndpointDefaults defaults; - - /** - * 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 PartialBatchEndpoint object itself. - */ - public PartialBatchEndpoint withDefaults(BatchEndpointDefaults defaults) { - this.defaults = defaults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defaults() != null) { - defaults().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.java deleted file mode 100644 index be8529d9ae5b2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchEndpointPartialTrackedResource.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialBatchEndpointPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialBatchEndpoint properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * 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 PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withIdentity(PartialManagedServiceIdentity 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 PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialBatchEndpoint properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource withProperties(PartialBatchEndpoint properties) { - this.properties = properties; - 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 PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource 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 PartialBatchEndpointPartialTrackedResource object itself. - */ - public PartialBatchEndpointPartialTrackedResource 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 (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.java deleted file mode 100644 index f61f00edfae65..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchRetrySettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Retry settings for a batch inference operation. */ -@Fluent -public final class PartialBatchRetrySettings { - /* - * Maximum retry count for a mini-batch - */ - @JsonProperty(value = "maxRetries") - private Integer maxRetries; - - /* - * Invocation timeout for a mini-batch, in ISO 8601 format. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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 PartialBatchRetrySettings object itself. - */ - public PartialBatchRetrySettings 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 PartialBatchRetrySettings object itself. - */ - public PartialBatchRetrySettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.java deleted file mode 100644 index 26cc403e2ee01..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialCodeConfiguration.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Configuration for a scoring code asset. */ -@Fluent -public final class PartialCodeConfiguration { - /* - * ARM resource ID of the code asset. - */ - @JsonProperty(value = "codeId") - private String codeId; - - /* - * The script to execute on startup. eg. "score.py" - */ - @JsonProperty(value = "scoringScript") - private String scoringScript; - - /** - * 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 PartialCodeConfiguration object itself. - */ - public PartialCodeConfiguration withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the scoringScript property: The script to execute on startup. eg. "score.py". - * - * @return the scoringScript value. - */ - public String scoringScript() { - return this.scoringScript; - } - - /** - * Set the scoringScript property: The script to execute on startup. eg. "score.py". - * - * @param scoringScript the scoringScript value to set. - * @return the PartialCodeConfiguration object itself. - */ - public PartialCodeConfiguration withScoringScript(String scoringScript) { - this.scoringScript = scoringScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.java deleted file mode 100644 index 7e09d678dd309..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialDataPathAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a datastore. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("DataPath") -@Fluent -public final class PartialDataPathAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the datastore where the asset is located. - */ - @JsonProperty(value = "datastoreId") - private String datastoreId; - - /* - * The path of the file/directory in the datastore. - */ - @JsonProperty(value = "path") - private String path; - - /** - * 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 PartialDataPathAssetReference object itself. - */ - public PartialDataPathAssetReference withDatastoreId(String datastoreId) { - this.datastoreId = datastoreId; - return this; - } - - /** - * 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 PartialDataPathAssetReference object itself. - */ - public PartialDataPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.java deleted file mode 100644 index 5803b53593f5a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialIdAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its ARM resource ID. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("Id") -@Fluent -public final class PartialIdAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the asset. - */ - @JsonProperty(value = "assetId") - private String assetId; - - /** - * Get the assetId property: ARM resource ID of the asset. - * - * @return the assetId value. - */ - public String assetId() { - return this.assetId; - } - - /** - * Set the assetId property: ARM resource ID of the asset. - * - * @param assetId the assetId value to set. - * @return the PartialIdAssetReference object itself. - */ - public PartialIdAssetReference 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(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialKubernetesOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialKubernetesOnlineDeployment.java deleted file mode 100644 index 31d7dc680c47f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialKubernetesOnlineDeployment.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties specific to a KubernetesOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Kubernetes") -@Immutable -public final class PartialKubernetesOnlineDeployment extends PartialOnlineDeployment { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.java deleted file mode 100644 index a44f5303a1237..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedOnlineDeployment.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Properties specific to a ManagedOnlineDeployment. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "endpointComputeType") -@JsonTypeName("Managed") -@Immutable -public final class PartialManagedOnlineDeployment extends PartialOnlineDeployment { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 f10c6d4cb8f9b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.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.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Managed service identity (system assigned and/or user assigned identities). */ -@Fluent -public class PartialManagedServiceIdentity { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "type") - private ManagedServiceIdentityType type; - - /* - * The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the - * form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - */ - @JsonProperty(value = "userAssignedIdentities") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map userAssignedIdentities; - - /** - * 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() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeployment.java deleted file mode 100644 index 0843c1eacbca4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeployment.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Mutable online deployment configuration. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "endpointComputeType", - defaultImpl = PartialOnlineDeployment.class) -@JsonTypeName("PartialOnlineDeployment") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Kubernetes", value = PartialKubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = PartialManagedOnlineDeployment.class) -}) -@Immutable -public class PartialOnlineDeployment { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeploymentPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeploymentPartialTrackedResource.java deleted file mode 100644 index 59b0439ec0fdd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineDeploymentPartialTrackedResource.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialOnlineDeploymentPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialOnlineDeployment properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * 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 PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withIdentity(PartialManagedServiceIdentity 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 PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialOnlineDeployment properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource withProperties(PartialOnlineDeployment properties) { - this.properties = properties; - 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 PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource 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 PartialOnlineDeploymentPartialTrackedResource object itself. - */ - public PartialOnlineDeploymentPartialTrackedResource 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 (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.java deleted file mode 100644 index ef3e28340fa1c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpoint.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Mutable online endpoint configuration. */ -@Fluent -public final class PartialOnlineEndpoint { - /* - * Percentage of traffic to be mirrored to each deployment without using - * returned scoring. Traffic values need to sum to utmost 50. - */ - @JsonProperty(value = "mirrorTraffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map mirrorTraffic; - - /* - * Set to "Enabled" for endpoints that should allow public access when - * Private Link is enabled. - */ - @JsonProperty(value = "publicNetworkAccess") - private PublicNetworkAccessType publicNetworkAccess; - - /* - * Percentage of traffic from endpoint to divert to each deployment. - * Traffic values need to sum to 100. - */ - @JsonProperty(value = "traffic") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map traffic; - - /** - * 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 PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint withMirrorTraffic(Map mirrorTraffic) { - this.mirrorTraffic = mirrorTraffic; - 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 PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint 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 PartialOnlineEndpoint object itself. - */ - public PartialOnlineEndpoint withTraffic(Map traffic) { - this.traffic = traffic; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.java deleted file mode 100644 index 48295e01bb07d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOnlineEndpointPartialTrackedResource.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialOnlineEndpointPartialTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned - * identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /* - * Metadata used by portal/tooling/etc to render different UX experiences - * for resources of the same type. - */ - @JsonProperty(value = "kind") - private String kind; - - /* - * The geo-location where the resource lives. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialOnlineEndpoint properties; - - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * 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 PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withIdentity(PartialManagedServiceIdentity 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 PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The geo-location where the resource lives. - * - * @param location the location value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialOnlineEndpoint properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource withProperties(PartialOnlineEndpoint properties) { - this.properties = properties; - 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 PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource 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 PartialOnlineEndpointPartialTrackedResource object itself. - */ - public PartialOnlineEndpointPartialTrackedResource 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 (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.java deleted file mode 100644 index 4490ec8d69e13..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialOutputPathAssetReference.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Reference to an asset via its path in a job output. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "referenceType") -@JsonTypeName("OutputPath") -@Fluent -public final class PartialOutputPathAssetReference extends PartialAssetReferenceBase { - /* - * ARM resource ID of the job. - */ - @JsonProperty(value = "jobId") - private String jobId; - - /* - * The path of the file/directory in the job output. - */ - @JsonProperty(value = "path") - private String path; - - /** - * 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 PartialOutputPathAssetReference object itself. - */ - public PartialOutputPathAssetReference withJobId(String jobId) { - this.jobId = jobId; - return this; - } - - /** - * 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 PartialOutputPathAssetReference object itself. - */ - public PartialOutputPathAssetReference withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 fc9c44c763dc8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Common SKU definition. */ -@Fluent -public final class PartialSku { - /* - * 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. - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /* - * If the service has different generations of hardware, for the same SKU, - * then that can be captured here. - */ - @JsonProperty(value = "family") - private String family; - - /* - * The name of the SKU. Ex - P3. It is typically a letter+number code. - */ - @JsonProperty(value = "name") - private String name; - - /* - * The SKU size. When the name field is the combination of tier and some - * other value, this would be the standalone code. - */ - @JsonProperty(value = "size") - private String size; - - /* - * 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. - */ - @JsonProperty(value = "tier") - private SkuTier tier; - - /** - * 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; - } - - /** - * 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 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 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 952af68a607b0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Password model. */ -@Immutable -public final class Password { - /* - * The name property. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * The value property. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /** - * 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() { - } -} 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 79a851afd6f15..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Settings for a personal compute instance. */ -@Fluent -public final class PersonalComputeInstanceSettings { - /* - * A user explicitly assigned to a personal compute instance. - */ - @JsonProperty(value = "assignedUser") - private AssignedUser assignedUser; - - /** - * 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(); - } - } -} 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 9ac31138c113d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Pipeline Job definition: defines generic to MFE attributes. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") -@JsonTypeName("Pipeline") -@Fluent -public final class PipelineJob extends JobBaseDetails { - /* - * Inputs for the pipeline job. - */ - @JsonProperty(value = "inputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map inputs; - - /* - * Jobs construct the Pipeline Job. - */ - @JsonProperty(value = "jobs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map jobs; - - /* - * Outputs for the pipeline job - */ - @JsonProperty(value = "outputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map outputs; - - /* - * Pipeline settings, for things like ContinueRunOnStepFailure etc. - */ - @JsonProperty(value = "settings") - private Object settings; - - /** - * 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 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 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 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; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** {@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 withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob 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 (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} 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 29c72d9d75d67..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Private Endpoint resource. */ -@Immutable -public final class PrivateEndpoint { - /* - * The ARM identifier for Private Endpoint - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The ARM identifier for Subnet resource that private endpoint links to - */ - @JsonProperty(value = "subnetArmId", access = JsonProperty.Access.WRITE_ONLY) - private String subnetArmId; - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the subnetArmId property: The ARM identifier for Subnet resource that private endpoint links to. - * - * @return the subnetArmId value. - */ - public String subnetArmId() { - return this.subnetArmId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 18d85548f8cb2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,340 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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 70d40c80d876a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** List of private endpoint connection associated with the specified workspace. */ -@Fluent -public final class PrivateEndpointConnectionListResult { - /* - * Array of private endpoint connections - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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()); - } - } -} 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 2bf3e7aa60308..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointConnectionProvisioningState. */ -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 or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - @JsonCreator - 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 a50a2b135afdf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnections.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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index a4e680c597f14..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PrivateEndpointServiceConnectionStatus. */ -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 or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @JsonCreator - 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 2be7efc232250..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.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.management.ProxyResource; -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** A private link resource. */ -@Fluent -public final class PrivateLinkResource extends ProxyResource { - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private PrivateLinkResourceProperties innerProperties; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * Specifies the location of the resource. - */ - @JsonProperty(value = "location") - private String location; - - /* - * Contains resource tags defined as key/value pairs. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** - * 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 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(); - } - } -} 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 a2e329b0c1adf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResourceListResult.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.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 aeeb3e4a95cc3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResources.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); -} 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 874e638188c92..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A collection of information about the state of the connection between service consumer and provider. */ -@Fluent -public final class PrivateLinkServiceConnectionState { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by - * the owner of the service. - */ - @JsonProperty(value = "status") - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - @JsonProperty(value = "description") - private String description; - - /* - * A message indicating if changes on the service provider require any - * updates on the consumer. - */ - @JsonProperty(value = "actionsRequired") - private String actionsRequired; - - /** - * 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() { - } -} 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 46d088fc354eb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Deployment container liveness/readiness probe configuration. */ -@Fluent -public final class ProbeSettings { - /* - * The number of failures to allow before returning an unhealthy status. - */ - @JsonProperty(value = "failureThreshold") - private Integer failureThreshold; - - /* - * The delay before the first probe in ISO 8601 format. - */ - @JsonProperty(value = "initialDelay") - private Duration initialDelay; - - /* - * The length of time between probes in ISO 8601 format. - */ - @JsonProperty(value = "period") - private Duration period; - - /* - * The number of successful probes before returning a healthy status. - */ - @JsonProperty(value = "successThreshold") - private Integer successThreshold; - - /* - * The probe timeout in ISO 8601 format. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /** - * 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 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; - } - - /** - * 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 0aceba0fd7c8d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningState. */ -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 or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @JsonCreator - 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 935dc806316ed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ProvisioningStatus. */ -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 or finds a ProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningStatus. - */ - @JsonCreator - 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 522621f6f32fd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PublicNetworkAccess. */ -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 or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - @JsonCreator - 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 80a26f8ee788b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for PublicNetworkAccessType. */ -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 or finds a PublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccessType. - */ - @JsonCreator - 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 cd93cc1f11491..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** PyTorch distribution configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") -@JsonTypeName("PyTorch") -@Fluent -public final class PyTorch extends DistributionConfiguration { - /* - * Number of processes per node. - */ - @JsonProperty(value = "processCountPerInstance") - private Integer processCountPerInstance; - - /** - * 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(); - } -} 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 8735c29e120fe..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.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.fasterxml.jackson.annotation.JsonProperty; - -/** The properties for Quota update or retrieval. */ -@Fluent -public final class QuotaBaseProperties { - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id") - private String id; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type") - private String type; - - /* - * Limit. The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit") - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit") - private QuotaUnit unit; - - /** - * 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: Limit. The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: Limit. 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() { - } -} 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 4f312f7f7e968..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for QuotaUnit. */ -public final class QuotaUnit extends ExpandableStringEnum { - /** Static value Count for QuotaUnit. */ - public static final QuotaUnit COUNT = fromString("Count"); - - /** - * Creates or finds a QuotaUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding QuotaUnit. - */ - @JsonCreator - 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 b51aee5733121..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Quota update parameters. */ -@Fluent -public final class QuotaUpdateParameters { - /* - * The list for update quota. - */ - @JsonProperty(value = "value") - private List value; - - /* - * Region of workspace quota to be updated. - */ - @JsonProperty(value = "location") - private String location; - - /** - * 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()); - } - } -} 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 1d770d9835703..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Quotas.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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 c4f935212e224..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines a Sampling Algorithm that generates values randomly. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "samplingAlgorithmType") -@JsonTypeName("Random") -@Fluent -public final class RandomSamplingAlgorithm extends SamplingAlgorithm { - /* - * The specific type of random algorithm - */ - @JsonProperty(value = "rule") - private RandomSamplingAlgorithmRule rule; - - /* - * An optional integer to use as the seed for random number generation - */ - @JsonProperty(value = "seed") - private Integer seed; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 db3dffa7f7eed..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RandomSamplingAlgorithmRule. */ -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 or finds a RandomSamplingAlgorithmRule from its string representation. - * - * @param name a name to look for. - * @return the corresponding RandomSamplingAlgorithmRule. - */ - @JsonCreator - 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/RecurrenceFrequency.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.java deleted file mode 100644 index 21ae5bf2d756f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RecurrenceFrequency. */ -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 or finds a RecurrenceFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecurrenceFrequency. - */ - @JsonCreator - 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/RecurrencePattern.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrencePattern.java deleted file mode 100644 index 68c3a5db6688d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrencePattern.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Recurrence schedule pattern definition. */ -@Fluent -public final class RecurrencePattern { - /* - * [Required] List of hours for recurrence schedule pattern - */ - @JsonProperty(value = "hours", required = true) - private List hours; - - /* - * [Required] List of minutes for recurrence schedule pattern - */ - @JsonProperty(value = "minutes", required = true) - private List minutes; - - /* - * List of weekdays for recurrence schedule pattern - */ - @JsonProperty(value = "weekdays") - private List weekdays; - - /** - * Get the hours property: [Required] List of hours for recurrence schedule pattern. - * - * @return the hours value. - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours property: [Required] List of hours for recurrence schedule pattern. - * - * @param hours the hours value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes property: [Required] List of minutes for recurrence schedule pattern. - * - * @return the minutes value. - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes property: [Required] List of minutes for recurrence schedule pattern. - * - * @param minutes the minutes value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the weekdays property: List of weekdays for recurrence schedule pattern. - * - * @return the weekdays value. - */ - public List weekdays() { - return this.weekdays; - } - - /** - * Set the weekdays property: List of weekdays for recurrence schedule pattern. - * - * @param weekdays the weekdays value to set. - * @return the RecurrencePattern object itself. - */ - public RecurrencePattern 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property hours in model RecurrencePattern")); - } - if (minutes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property minutes in model RecurrencePattern")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrencePattern.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 791c35fc149d8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Recurrence schedule definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scheduleType") -@JsonTypeName("Recurrence") -@Fluent -public final class RecurrenceSchedule extends ScheduleBase { - /* - * [Required] Specifies frequency with with which to trigger schedule - */ - @JsonProperty(value = "frequency", required = true) - private RecurrenceFrequency frequency; - - /* - * [Required] Specifies schedule interval in conjunction with frequency - */ - @JsonProperty(value = "interval", required = true) - private int interval; - - /* - * Specifies the recurrence schedule pattern - */ - @JsonProperty(value = "pattern") - private RecurrencePattern pattern; - - /** - * Get the frequency property: [Required] Specifies frequency with with which to trigger schedule. - * - * @return the frequency value. - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency property: [Required] Specifies frequency with with which to trigger schedule. - * - * @param frequency the frequency value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule 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 RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withInterval(int interval) { - this.interval = interval; - return this; - } - - /** - * Get the pattern property: Specifies the recurrence schedule pattern. - * - * @return the pattern value. - */ - public RecurrencePattern pattern() { - return this.pattern; - } - - /** - * Set the pattern property: Specifies the recurrence schedule pattern. - * - * @param pattern the pattern value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withPattern(RecurrencePattern pattern) { - this.pattern = pattern; - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withEndTime(OffsetDateTime endTime) { - super.withEndTime(endTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withScheduleStatus(ScheduleStatus scheduleStatus) { - super.withScheduleStatus(scheduleStatus); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule withStartTime(OffsetDateTime startTime) { - super.withStartTime(startTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceSchedule 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property frequency in model RecurrenceSchedule")); - } - if (pattern() != null) { - pattern().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceSchedule.class); -} 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 ebfd2974be4af..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ReferenceType. */ -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 or finds a ReferenceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReferenceType. - */ - @JsonCreator - 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 e75663190cd87..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The RegenerateEndpointKeysRequest model. */ -@Fluent -public final class RegenerateEndpointKeysRequest { - /* - * [Required] Specification for which type of key to generate. Primary or - * Secondary. - */ - @JsonProperty(value = "keyType", required = true) - private KeyType keyType; - - /* - * The value the key is set to. - */ - @JsonProperty(value = "keyValue") - private String keyValue; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property keyType in model RegenerateEndpointKeysRequest")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RegenerateEndpointKeysRequest.class); -} 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 8ccf2b521000a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The RegistryListCredentialsResult model. */ -@Fluent -public final class RegistryListCredentialsResult { - /* - * The location property. - */ - @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) - private String location; - - /* - * The username property. - */ - @JsonProperty(value = "username", access = JsonProperty.Access.WRITE_ONLY) - private String username; - - /* - * The passwords property. - */ - @JsonProperty(value = "passwords") - private List passwords; - - /** - * 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()); - } - } -} 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 c74055ad93d8a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.List; - -/** Regression task in AutoML Table vertical. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("Regression") -@Fluent -public final class Regression extends AutoMLVertical { - /* - * Allowed models for regression task. - */ - @JsonProperty(value = "allowedModels") - private List allowedModels; - - /* - * Blocked models for regression task. - */ - @JsonProperty(value = "blockedModels") - private List blockedModels; - - /* - * Primary metric for regression task. - */ - @JsonProperty(value = "primaryMetric") - private RegressionPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; - - /** - * Get the allowedModels property: Allowed models for regression task. - * - * @return the allowedModels value. - */ - public List allowedModels() { - return this.allowedModels; - } - - /** - * Set the allowedModels property: Allowed models for regression task. - * - * @param allowedModels the allowedModels value to set. - * @return the Regression object itself. - */ - public Regression withAllowedModels(List allowedModels) { - this.allowedModels = allowedModels; - return this; - } - - /** - * Get the blockedModels property: Blocked models for regression task. - * - * @return the blockedModels value. - */ - public List blockedModels() { - return this.blockedModels; - } - - /** - * Set the blockedModels property: Blocked models for regression task. - * - * @param blockedModels the blockedModels value to set. - * @return the Regression object itself. - */ - public Regression withBlockedModels(List blockedModels) { - this.blockedModels = blockedModels; - return this; - } - - /** - * 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the Regression object itself. - */ - public Regression withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** - * 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 trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public TrainingSettings 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(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public Regression withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - } -} 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 7116f002cdee4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RegressionModels. */ -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 or finds a RegressionModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionModels. - */ - @JsonCreator - 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 cda7c0026ab78..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RegressionPrimaryMetrics. */ -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 or finds a RegressionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionPrimaryMetrics. - */ - @JsonCreator - 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/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java deleted file mode 100644 index 08ff94bab2bef..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for RemoteLoginPortPublicAccess. */ -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 or finds a RemoteLoginPortPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding RemoteLoginPortPublicAccess. - */ - @JsonCreator - 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/ResourceBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java deleted file mode 100644 index 70d85519553d2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The ResourceBase model. */ -@Fluent -public class ResourceBase { - /* - * The asset description text. - */ - @JsonProperty(value = "description") - private String description; - - /* - * The asset property dictionary. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /* - * Tag dictionary. Tags can be added, removed, and updated. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** - * 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 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 bb76bf3d21d17..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The ResourceConfiguration model. */ -@Fluent -public final class ResourceConfiguration { - /* - * Optional number of instances or nodes used by the compute target. - */ - @JsonProperty(value = "instanceCount") - private Integer instanceCount; - - /* - * Optional type of VM used as supported by the compute target. - */ - @JsonProperty(value = "instanceType") - private String instanceType; - - /* - * Additional properties bag. - */ - @JsonProperty(value = "properties") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map properties; - - /** - * 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() { - } -} 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 32afa0de3b45f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet. */ -@Fluent -public final class ResourceId { - /* - * The ID of the resource - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * 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 - .logExceptionAsError(new IllegalArgumentException("Missing required property id in model ResourceId")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ResourceId.class); -} 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 9071301bdc354..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Resource Name. */ -@Immutable -public final class ResourceName { - /* - * The name of the resource. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * 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() { - } -} 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 a80079d702b5c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.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.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: Limit. 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/Route.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java deleted file mode 100644 index 19a2b1f5f6353..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Route model. */ -@Fluent -public final class Route { - /* - * [Required] The path for the route. - */ - @JsonProperty(value = "path", required = true) - private String path; - - /* - * [Required] The port for the route. - */ - @JsonProperty(value = "port", required = true) - private int port; - - /** - * 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 - .logExceptionAsError(new IllegalArgumentException("Missing required property path in model Route")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Route.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 0a123f35bc483..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.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.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The Sampling Algorithm used to generate hyperparameter values, along with properties to configure the algorithm. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "samplingAlgorithmType", - defaultImpl = SamplingAlgorithm.class) -@JsonTypeName("SamplingAlgorithm") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Bayesian", value = BayesianSamplingAlgorithm.class), - @JsonSubTypes.Type(name = "Grid", value = GridSamplingAlgorithm.class), - @JsonSubTypes.Type(name = "Random", value = RandomSamplingAlgorithm.class) -}) -@Immutable -public class SamplingAlgorithm { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 2a6d9ec999c5e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a SamplingAlgorithmType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SamplingAlgorithmType. - */ - @JsonCreator - 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/SasDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.java deleted file mode 100644 index 0aa3c83cbbaaa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** SAS datastore credentials configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("Sas") -@Fluent -public final class SasDatastoreCredentials extends DatastoreCredentials { - /* - * [Required] Storage container secrets. - */ - @JsonProperty(value = "secrets", required = true) - private SasDatastoreSecrets secrets; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property secrets in model SasDatastoreCredentials")); - } else { - secrets().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SasDatastoreCredentials.class); -} 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 0271555708364..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Datastore SAS secrets. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("Sas") -@Fluent -public final class SasDatastoreSecrets extends DatastoreSecretsInner { - /* - * Storage container SAS token. - */ - @JsonProperty(value = "sasToken") - private String sasToken; - - /** - * 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(); - } -} 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 723b1a70a0888..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** scale settings for AML Compute. */ -@Fluent -public final class ScaleSettings { - /* - * Max number of nodes to use - */ - @JsonProperty(value = "maxNodeCount", required = true) - private int maxNodeCount; - - /* - * Min number of nodes to use - */ - @JsonProperty(value = "minNodeCount") - private Integer minNodeCount; - - /* - * Node Idle Time before scaling down amlCompute. This string needs to be - * in the RFC Format. - */ - @JsonProperty(value = "nodeIdleTimeBeforeScaleDown") - private Duration nodeIdleTimeBeforeScaleDown; - - /** - * 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() { - } -} 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 96bab47500290..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Desired scale settings for the amlCompute. */ -@Fluent -public final class ScaleSettingsInformation { - /* - * scale settings for AML Compute - */ - @JsonProperty(value = "scaleSettings") - private ScaleSettings scaleSettings; - - /** - * 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(); - } - } -} 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 2e2ad685d7588..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a ScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleType. - */ - @JsonCreator - 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/ScheduleBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java deleted file mode 100644 index 1dcf02015d2ad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.OffsetDateTime; - -/** Base definition of a schedule. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "scheduleType", - defaultImpl = ScheduleBase.class) -@JsonTypeName("ScheduleBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Cron", value = CronSchedule.class), - @JsonSubTypes.Type(name = "Recurrence", value = RecurrenceSchedule.class) -}) -@Fluent -public class ScheduleBase { - /* - * Specifies end time of schedule in ISO 8601 format. - * If not present, the schedule will run indefinitely - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * Specifies the schedule's status - */ - @JsonProperty(value = "scheduleStatus") - private ScheduleStatus scheduleStatus; - - /* - * Specifies start time of schedule in ISO 8601 format. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. - */ - @JsonProperty(value = "timeZone") - private String timeZone; - - /** - * Get the endTime property: Specifies end time of schedule in ISO 8601 format. If not present, the schedule will - * run indefinitely. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Specifies end time of schedule in ISO 8601 format. If not present, the schedule will - * run indefinitely. - * - * @param endTime the endTime value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the scheduleStatus property: Specifies the schedule's status. - * - * @return the scheduleStatus value. - */ - public ScheduleStatus scheduleStatus() { - return this.scheduleStatus; - } - - /** - * Set the scheduleStatus property: Specifies the schedule's status. - * - * @param scheduleStatus the scheduleStatus value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withScheduleStatus(ScheduleStatus scheduleStatus) { - this.scheduleStatus = scheduleStatus; - return this; - } - - /** - * Get the startTime property: Specifies start time of schedule in ISO 8601 format. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Specifies start time of schedule in ISO 8601 format. - * - * @param startTime the startTime value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withStartTime(OffsetDateTime 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. - * - * @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. - * - * @param timeZone the timeZone value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 92b11da22c9e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ScheduleStatus. */ -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 or finds a ScheduleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleStatus. - */ - @JsonCreator - 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/ScheduleType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.java deleted file mode 100644 index d8e625b267119..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ScheduleType. */ -public final class ScheduleType extends ExpandableStringEnum { - /** Static value Cron for ScheduleType. */ - public static final ScheduleType CRON = fromString("Cron"); - - /** Static value Recurrence for ScheduleType. */ - public static final ScheduleType RECURRENCE = fromString("Recurrence"); - - /** - * Creates or finds a ScheduleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleType. - */ - @JsonCreator - public static ScheduleType fromString(String name) { - return fromString(name, ScheduleType.class); - } - - /** - * Gets known ScheduleType values. - * - * @return known ScheduleType values. - */ - public static Collection values() { - return values(ScheduleType.class); - } -} 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 2fb97c2ac2d44..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.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.fasterxml.jackson.annotation.JsonProperty; - -/** Script reference. */ -@Fluent -public final class ScriptReference { - /* - * The storage source of the script: inline, workspace. - */ - @JsonProperty(value = "scriptSource") - private String scriptSource; - - /* - * The location of scripts in the mounted volume. - */ - @JsonProperty(value = "scriptData") - private String scriptData; - - /* - * Optional command line arguments passed to the script to run. - */ - @JsonProperty(value = "scriptArguments") - private String scriptArguments; - - /* - * Optional time period passed to timeout command. - */ - @JsonProperty(value = "timeout") - private String timeout; - - /** - * Get the scriptSource property: The storage source of the script: inline, workspace. - * - * @return the scriptSource value. - */ - public String scriptSource() { - return this.scriptSource; - } - - /** - * Set the scriptSource property: The storage source of the script: inline, 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() { - } -} 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 5d4c3ca953452..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Customized setup scripts. */ -@Fluent -public final class ScriptsToExecute { - /* - * Script that's run every time the machine starts. - */ - @JsonProperty(value = "startupScript") - private ScriptReference startupScript; - - /* - * Script that's run only once during provision of the compute. - */ - @JsonProperty(value = "creationScript") - private ScriptReference creationScript; - - /** - * 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(); - } - } -} 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 492ad5302809a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Forecasting seasonality. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "mode", - defaultImpl = Seasonality.class) -@JsonTypeName("Seasonality") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Auto", value = AutoSeasonality.class), - @JsonSubTypes.Type(name = "Custom", value = CustomSeasonality.class) -}) -@Immutable -public class Seasonality { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 d8225d3d3201c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SeasonalityMode. */ -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 or finds a SeasonalityMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeasonalityMode. - */ - @JsonCreator - 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 388b3554104ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SecretsType. */ -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"); - - /** Static value KerberosPassword for SecretsType. */ - public static final SecretsType KERBEROS_PASSWORD = fromString("KerberosPassword"); - - /** Static value KerberosKeytab for SecretsType. */ - public static final SecretsType KERBEROS_KEYTAB = fromString("KerberosKeytab"); - - /** - * Creates or finds a SecretsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecretsType. - */ - @JsonCreator - 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/ServiceDataAccessAuthIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.java deleted file mode 100644 index ace4b9598b47d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a ServiceDataAccessAuthIdentity from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceDataAccessAuthIdentity. - */ - @JsonCreator - 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 1438abd31424f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ServiceManagedResourcesSettings model. */ -@Fluent -public final class ServiceManagedResourcesSettings { - /* - * The settings for the service managed cosmosdb account. - */ - @JsonProperty(value = "cosmosDb") - private CosmosDbSettings cosmosDb; - - /** - * 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(); - } - } -} 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 0bec235e2fe74..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.UUID; - -/** Service Principal datastore credentials configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "credentialsType") -@JsonTypeName("ServicePrincipal") -@Fluent -public final class ServicePrincipalDatastoreCredentials extends DatastoreCredentials { - /* - * Authority URL used for authentication. - */ - @JsonProperty(value = "authorityUrl") - private String authorityUrl; - - /* - * [Required] Service principal client ID. - */ - @JsonProperty(value = "clientId", required = true) - private UUID clientId; - - /* - * Resource the service principal has access to. - */ - @JsonProperty(value = "resourceUrl") - private String resourceUrl; - - /* - * [Required] Service principal secrets. - */ - @JsonProperty(value = "secrets", required = true) - private ServicePrincipalDatastoreSecrets secrets; - - /* - * [Required] ID of the tenant to which the service principal belongs. - */ - @JsonProperty(value = "tenantId", required = true) - private UUID tenantId; - - /** - * 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 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 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 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalDatastoreCredentials")); - } - if (secrets() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secrets in model ServicePrincipalDatastoreCredentials")); - } else { - secrets().validate(); - } - if (tenantId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tenantId in model ServicePrincipalDatastoreCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ServicePrincipalDatastoreCredentials.class); -} 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 b3d9db3a1bf1d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Datastore Service Principal secrets. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretsType") -@JsonTypeName("ServicePrincipal") -@Fluent -public final class ServicePrincipalDatastoreSecrets extends DatastoreSecretsInner { - /* - * Service principal secret. - */ - @JsonProperty(value = "clientSecret") - private String clientSecret; - - /** - * 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(); - } -} 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 e91fb7fa8ad32..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Details of customized scripts to execute for setting up the cluster. */ -@Fluent -public final class SetupScripts { - /* - * Customized setup scripts - */ - @JsonProperty(value = "scripts") - private ScriptsToExecute scripts; - - /** - * 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(); - } - } -} 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 ad54f8d39f4cd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.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.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SharedPrivateLinkResource model. */ -@Fluent -public final class SharedPrivateLinkResource { - /* - * Unique name of the private link. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private SharedPrivateLinkResourceProperty innerProperties; - - /** - * 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(); - } - } -} 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 ef74acc669177..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ShortSeriesHandlingConfiguration. */ -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 or finds a ShortSeriesHandlingConfiguration from its string representation. - * - * @param name a name to look for. - * @return the corresponding ShortSeriesHandlingConfiguration. - */ - @JsonCreator - 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 27327ff52c42f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The resource model definition representing SKU. */ -@Fluent -public final class Sku { - /* - * The name of the SKU. Ex - P3. It is typically a letter+number code - */ - @JsonProperty(value = "name", required = true) - 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. - */ - @JsonProperty(value = "tier") - 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. - */ - @JsonProperty(value = "size") - private String size; - - /* - * If the service has different generations of hardware, for the same SKU, - * then that can be captured here. - */ - @JsonProperty(value = "family") - 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. - */ - @JsonProperty(value = "capacity") - private Integer capacity; - - /** - * 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 - .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); -} 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 6de4a3d9612a1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.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.fasterxml.jackson.annotation.JsonProperty; - -/** SKU capacity information. */ -@Fluent -public final class SkuCapacity { - /* - * Gets or sets the default capacity. - */ - @JsonProperty(value = "default") - private Integer defaultProperty; - - /* - * Gets or sets the maximum. - */ - @JsonProperty(value = "maximum") - private Integer maximum; - - /* - * Gets or sets the minimum. - */ - @JsonProperty(value = "minimum") - private Integer minimum; - - /* - * Gets or sets the type of the scale. - */ - @JsonProperty(value = "scaleType") - private SkuScaleType scaleType; - - /** - * 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 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 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 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() { - } -} 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 40eb8b46ed0db..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResource.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.resourcemanager.machinelearning.fluent.models.SkuResourceInner; - -/** An immutable client-side representation of SkuResource. */ -public interface SkuResource { - /** - * Gets the capacity property: Gets or sets the Sku Capacity. - * - * @return the capacity value. - */ - SkuCapacity capacity(); - - /** - * 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 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 54e18a3dfd38e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of SkuResource entities. */ -@Fluent -public final class SkuResourceArmPaginatedResult { - /* - * The link to the next page of SkuResource objects. If null, there are no - * additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type SkuResource. - */ - @JsonProperty(value = "value") - private List value; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/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 d5c57abc058b8..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SkuScaleType. */ -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 or finds a SkuScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuScaleType. - */ - @JsonCreator - 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 4500caef2b7e4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** SkuSetting fulfills the need for stripped down SKU info in ARM contract. */ -@Fluent -public final class SkuSetting { - /* - * [Required] The name of the SKU. Ex - P3. It is typically a letter+number - * code. - */ - @JsonProperty(value = "name", required = true) - 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. - */ - @JsonProperty(value = "tier") - private SkuTier tier; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model SkuSetting")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SkuSetting.class); -} 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 c49319c0b114b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** Defines values for SkuTier. */ -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. - */ - @JsonCreator - public static SkuTier fromString(String value) { - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - @JsonValue - @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 e5090e49e4893..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SourceType. */ -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 or finds a SourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceType. - */ - @JsonCreator - 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/SshPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.java deleted file mode 100644 index 7aa0f02569915..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SshPublicAccess. */ -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 or finds a SshPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding SshPublicAccess. - */ - @JsonCreator - 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/SslConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java deleted file mode 100644 index 656dd43a46d3b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The ssl configuration for scoring. */ -@Fluent -public final class SslConfiguration { - /* - * Enable or disable ssl for scoring - */ - @JsonProperty(value = "status") - private SslConfigurationStatus status; - - /* - * Cert data - */ - @JsonProperty(value = "cert") - private String cert; - - /* - * Key data - */ - @JsonProperty(value = "key") - private String key; - - /* - * CNAME of the cert - */ - @JsonProperty(value = "cname") - private String cname; - - /* - * Leaf domain label of public endpoint - */ - @JsonProperty(value = "leafDomainLabel") - private String leafDomainLabel; - - /* - * Indicates whether to overwrite existing domain label. - */ - @JsonProperty(value = "overwriteExistingDomain") - private Boolean overwriteExistingDomain; - - /** - * Get the status property: Enable or disable ssl for scoring. - * - * @return the status value. - */ - public SslConfigurationStatus 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(SslConfigurationStatus 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() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.java deleted file mode 100644 index ee60c5c32bbd1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigurationStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SslConfigurationStatus. */ -public final class SslConfigurationStatus extends ExpandableStringEnum { - /** Static value Disabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus DISABLED = fromString("Disabled"); - - /** Static value Enabled for SslConfigurationStatus. */ - public static final SslConfigurationStatus ENABLED = fromString("Enabled"); - - /** Static value Auto for SslConfigurationStatus. */ - public static final SslConfigurationStatus AUTO = fromString("Auto"); - - /** - * Creates or finds a SslConfigurationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SslConfigurationStatus. - */ - @JsonCreator - public static SslConfigurationStatus fromString(String name) { - return fromString(name, SslConfigurationStatus.class); - } - - /** - * Gets known SslConfigurationStatus values. - * - * @return known SslConfigurationStatus values. - */ - public static Collection values() { - return values(SslConfigurationStatus.class); - } -} 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 39aeadd4f94e9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.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.fasterxml.jackson.annotation.JsonProperty; - -/** Advances setting to customize StackEnsemble run. */ -@Fluent -public final class StackEnsembleSettings { - /* - * Optional parameters to pass to the initializer of the meta-learner. - */ - @JsonProperty(value = "stackMetaLearnerKWargs") - private Object stackMetaLearnerKWargs; - - /* - * 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. - */ - @JsonProperty(value = "stackMetaLearnerTrainPercentage") - private Double stackMetaLearnerTrainPercentage; - - /* - * The meta-learner is a model trained on the output of the individual - * heterogeneous models. - */ - @JsonProperty(value = "stackMetaLearnerType") - private StackMetaLearnerType stackMetaLearnerType; - - /** - * 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; - } - - /** - * 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 5b630344e1767..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for StackMetaLearnerType. */ -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 or finds a StackMetaLearnerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StackMetaLearnerType. - */ - @JsonCreator - 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/Status.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java deleted file mode 100644 index 2105b7a051e7c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for Status. */ -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 or finds a Status from its string representation. - * - * @param name a name to look for. - * @return the corresponding Status. - */ - @JsonCreator - 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 ac5dd8d6cee8c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for StochasticOptimizer. */ -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 or finds a StochasticOptimizer from its string representation. - * - * @param name a name to look for. - * @return the corresponding StochasticOptimizer. - */ - @JsonCreator - 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/StorageAccountType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.java deleted file mode 100644 index 5fcfb2bfbb722..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for StorageAccountType. */ -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 or finds a StorageAccountType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAccountType. - */ - @JsonCreator - 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 6240a092e4c0c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java +++ /dev/null @@ -1,368 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** Sweep job definition. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobType") -@JsonTypeName("Sweep") -@Fluent -public final class SweepJob extends JobBaseDetails { - /* - * Early termination policies enable canceling poor-performing runs before - * they complete - */ - @JsonProperty(value = "earlyTermination") - private EarlyTerminationPolicy earlyTermination; - - /* - * Mapping of input data bindings used in the job. - */ - @JsonProperty(value = "inputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map inputs; - - /* - * Sweep Job limit. - */ - @JsonProperty(value = "limits") - private SweepJobLimits limits; - - /* - * [Required] Optimization objective. - */ - @JsonProperty(value = "objective", required = true) - private Objective objective; - - /* - * Mapping of output data bindings used in the job. - */ - @JsonProperty(value = "outputs") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map outputs; - - /* - * [Required] The hyperparameter sampling algorithm - */ - @JsonProperty(value = "samplingAlgorithm", required = true) - private SamplingAlgorithm samplingAlgorithm; - - /* - * [Required] A dictionary containing each parameter and its distribution. - * The dictionary key is the name of the parameter - */ - @JsonProperty(value = "searchSpace", required = true) - private Object searchSpace; - - /* - * [Required] Trial component definition. - */ - @JsonProperty(value = "trial", required = true) - private TrialComponent trial; - - /** - * 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 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 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 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 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 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 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 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; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withComputeId(String computeId) { - super.withComputeId(computeId); - return this; - } - - /** {@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 withIdentity(IdentityConfiguration identity) { - super.withIdentity(identity); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withSchedule(ScheduleBase schedule) { - super.withSchedule(schedule); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withServices(Map services) { - super.withServices(services); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public SweepJob 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 (earlyTermination() != null) { - earlyTermination().validate(); - } - if (inputs() != null) { - inputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (limits() != null) { - limits().validate(); - } - if (objective() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property objective in model SweepJob")); - } else { - objective().validate(); - } - if (outputs() != null) { - outputs() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - if (samplingAlgorithm() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property samplingAlgorithm in model SweepJob")); - } else { - samplingAlgorithm().validate(); - } - if (searchSpace() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property searchSpace in model SweepJob")); - } - if (trial() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property trial in model SweepJob")); - } else { - trial().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SweepJob.class); -} 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 14a2a0d786da9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** Sweep Job limit class. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobLimitsType") -@JsonTypeName("Sweep") -@Fluent -public final class SweepJobLimits extends JobLimits { - /* - * Sweep Job max concurrent trials. - */ - @JsonProperty(value = "maxConcurrentTrials") - private Integer maxConcurrentTrials; - - /* - * Sweep Job max total trials. - */ - @JsonProperty(value = "maxTotalTrials") - private Integer maxTotalTrials; - - /* - * Sweep Job Trial timeout value. - */ - @JsonProperty(value = "trialTimeout") - private Duration trialTimeout; - - /** - * 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 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 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(); - } -} 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 142dbc094de39..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A SynapseSpark compute. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("SynapseSpark") -@Fluent -public final class SynapseSpark extends Compute { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private SynapseSparkProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 4b5aa30f06ccf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The SynapseSparkProperties model. */ -@Fluent -public final class SynapseSparkProperties { - /* - * Auto scale properties. - */ - @JsonProperty(value = "autoScaleProperties") - private AutoScaleProperties autoScaleProperties; - - /* - * Auto pause properties. - */ - @JsonProperty(value = "autoPauseProperties") - private AutoPauseProperties autoPauseProperties; - - /* - * Spark version. - */ - @JsonProperty(value = "sparkVersion") - private String sparkVersion; - - /* - * The number of compute nodes currently assigned to the compute. - */ - @JsonProperty(value = "nodeCount") - private Integer nodeCount; - - /* - * Node size. - */ - @JsonProperty(value = "nodeSize") - private String nodeSize; - - /* - * Node size family. - */ - @JsonProperty(value = "nodeSizeFamily") - private String nodeSizeFamily; - - /* - * Azure subscription identifier. - */ - @JsonProperty(value = "subscriptionId") - private String subscriptionId; - - /* - * Name of the resource group in which workspace is located. - */ - @JsonProperty(value = "resourceGroup") - private String resourceGroup; - - /* - * Name of Azure Machine Learning workspace. - */ - @JsonProperty(value = "workspaceName") - private String workspaceName; - - /* - * Pool name. - */ - @JsonProperty(value = "poolName") - private String poolName; - - /** - * 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(); - } - } -} 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 ce5e576330a51..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** A system service running on a compute. */ -@Immutable -public final class SystemService { - /* - * The type of this system service. - */ - @JsonProperty(value = "systemServiceType", access = JsonProperty.Access.WRITE_ONLY) - private String systemServiceType; - - /* - * Public IP address - */ - @JsonProperty(value = "publicIpAddress", access = JsonProperty.Access.WRITE_ONLY) - private String publicIpAddress; - - /* - * The version for this type. - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /** - * 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() { - } -} 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 56816059ee7bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.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.fasterxml.jackson.annotation.JsonProperty; - -/** Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. */ -@Fluent -public class TableVertical { - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private TableVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private TrainingSettings trainingSettings; - - /** - * Get the dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public TableVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TableVertical object itself. - */ - public TableVertical withDataSettings(TableVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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; - } - - /** - * 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 trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public TrainingSettings 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 TableVertical object itself. - */ - public TableVertical withTrainingSettings(TrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalDataSettings.java deleted file mode 100644 index ac98e0ce4ded6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalDataSettings.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.fasterxml.jackson.annotation.JsonProperty; - -/** Class for data inputs. */ -@Fluent -public final class TableVerticalDataSettings extends DataSettings { - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private TableVerticalValidationDataSettings validationData; - - /* - * 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. - */ - @JsonProperty(value = "weightColumnName") - private String weightColumnName; - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public TableVerticalValidationDataSettings validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TableVerticalDataSettings object itself. - */ - public TableVerticalDataSettings withValidationData(TableVerticalValidationDataSettings validationData) { - this.validationData = validationData; - 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 TableVerticalDataSettings object itself. - */ - public TableVerticalDataSettings withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTestData(TestDataSettings testData) { - super.withTestData(testData); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalDataSettings withTrainingData(TrainingDataSettings trainingData) { - super.withTrainingData(trainingData); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (validationData() != null) { - validationData().validate(); - } - } -} 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 03ae45a3adca3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; - -/** Featurization Configuration. */ -@Fluent -public final class TableVerticalFeaturizationSettings extends FeaturizationSettings { - /* - * These transformers shall not be used in featurization. - */ - @JsonProperty(value = "blockedTransformers") - private List blockedTransformers; - - /* - * Dictionary of column name and its type (int, float, string, datetime - * etc). - */ - @JsonProperty(value = "columnNameAndTypes") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map columnNameAndTypes; - - /* - * Columns to be dropped from data during featurization. - */ - @JsonProperty(value = "dropColumns") - private List dropColumns; - - /* - * Determines whether to use Dnn based featurizers for data featurization. - */ - @JsonProperty(value = "enableDnnFeaturization") - private Boolean enableDnnFeaturization; - - /* - * 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. - */ - @JsonProperty(value = "mode") - private FeaturizationMode mode; - - /* - * User can specify additional transformers to be used along with the - * columns to which it would be applied and parameters for the transformer - * constructor. - */ - @JsonProperty(value = "transformerParams") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map> transformerParams; - - /** - * 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 dropColumns property: Columns to be dropped from data during featurization. - * - * @return the dropColumns value. - */ - public List dropColumns() { - return this.dropColumns; - } - - /** - * Set the dropColumns property: Columns to be dropped from data during featurization. - * - * @param dropColumns the dropColumns value to set. - * @return the TableVerticalFeaturizationSettings object itself. - */ - public TableVerticalFeaturizationSettings withDropColumns(List dropColumns) { - this.dropColumns = dropColumns; - 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; - } - - /** - * 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 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; - } - - /** {@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()); - } - }); - } - } -} 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 3b6fa66980aee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Job execution constraints. */ -@Fluent -public final class TableVerticalLimitSettings { - /* - * Enable early termination, determines whether or not if AutoMLJob will - * terminate early if there is no score improvement in last 20 iterations. - */ - @JsonProperty(value = "enableEarlyTermination") - private Boolean enableEarlyTermination; - - /* - * Exit score for the AutoML job. - */ - @JsonProperty(value = "exitScore") - private Double exitScore; - - /* - * Maximum Concurrent iterations. - */ - @JsonProperty(value = "maxConcurrentTrials") - private Integer maxConcurrentTrials; - - /* - * Max cores per iteration. - */ - @JsonProperty(value = "maxCoresPerTrial") - private Integer maxCoresPerTrial; - - /* - * Number of iterations. - */ - @JsonProperty(value = "maxTrials") - private Integer maxTrials; - - /* - * AutoML job timeout. - */ - @JsonProperty(value = "timeout") - private Duration timeout; - - /* - * Iteration timeout. - */ - @JsonProperty(value = "trialTimeout") - private Duration trialTimeout; - - /** - * 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; - } - - /** - * 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 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 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 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.java deleted file mode 100644 index 510c3ec340773..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalValidationDataSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Validation settings for AutoML Table vertical tasks - Classification/Regression/Forecasting. */ -@Fluent -public final class TableVerticalValidationDataSettings extends ValidationDataSettings { - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /** - * 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 TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - 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 TableVerticalValidationDataSettings object itself. - */ - public TableVerticalValidationDataSettings withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings withData(MLTableJobInput data) { - super.withData(data); - return this; - } - - /** {@inheritDoc} */ - @Override - public TableVerticalValidationDataSettings 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 (nCrossValidations() != null) { - nCrossValidations().validate(); - } - } -} 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 2479f0d555f05..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TargetAggregationFunction. */ -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 or finds a TargetAggregationFunction from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetAggregationFunction. - */ - @JsonCreator - 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 247e53fc3cbf1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The number of past periods to lag from the target column. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "mode", - defaultImpl = TargetLags.class) -@JsonTypeName("TargetLags") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Auto", value = AutoTargetLags.class), - @JsonSubTypes.Type(name = "Custom", value = CustomTargetLags.class) -}) -@Immutable -public class TargetLags { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 75e0e3896045d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TargetLagsMode. */ -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 or finds a TargetLagsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetLagsMode. - */ - @JsonCreator - 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 6d4fcbc957abd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Forecasting target rolling window size. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "mode", - defaultImpl = TargetRollingWindowSize.class) -@JsonTypeName("TargetRollingWindowSize") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Auto", value = AutoTargetRollingWindowSize.class), - @JsonSubTypes.Type(name = "Custom", value = CustomTargetRollingWindowSize.class) -}) -@Immutable -public class TargetRollingWindowSize { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 602aaeea6f706..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TargetRollingWindowSizeMode. */ -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 or finds a TargetRollingWindowSizeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetRollingWindowSizeMode. - */ - @JsonCreator - 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 883674640ed29..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.time.Duration; - -/** The TargetUtilizationScaleSettings model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "scaleType") -@JsonTypeName("TargetUtilization") -@Fluent -public final class TargetUtilizationScaleSettings extends OnlineScaleSettings { - /* - * The maximum number of instances that the deployment can scale to. The - * quota will be reserved for max_instances. - */ - @JsonProperty(value = "maxInstances") - private Integer maxInstances; - - /* - * The minimum number of instances to always be present. - */ - @JsonProperty(value = "minInstances") - private Integer minInstances; - - /* - * The polling interval in ISO 8691 format. Only supports duration with - * precision as low as Seconds. - */ - @JsonProperty(value = "pollingInterval") - private Duration pollingInterval; - - /* - * Target CPU usage for the autoscaler. - */ - @JsonProperty(value = "targetUtilizationPercentage") - private Integer targetUtilizationPercentage; - - /** - * 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; - } - - /** - * 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 4913494e15a82..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for TaskType. */ -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 or finds a TaskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TaskType. - */ - @JsonCreator - 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 01479f1c2d572..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** TensorFlow distribution configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "distributionType") -@JsonTypeName("TensorFlow") -@Fluent -public final class TensorFlow extends DistributionConfiguration { - /* - * Number of parameter server tasks. - */ - @JsonProperty(value = "parameterServerCount") - private Integer parameterServerCount; - - /* - * Number of workers. If not specified, will default to the instance count. - */ - @JsonProperty(value = "workerCount") - private Integer workerCount; - - /** - * 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; - } - - /** - * 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.java deleted file mode 100644 index 53e832a6dfcd0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TestDataSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Test data inputs. */ -@Fluent -public final class TestDataSettings { - /* - * Test data MLTable. - */ - @JsonProperty(value = "data") - private MLTableJobInput data; - - /* - * 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. - */ - @JsonProperty(value = "testDataSize") - private Double testDataSize; - - /** - * Get the data property: Test data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: Test data MLTable. - * - * @param data the data value to set. - * @return the TestDataSettings object itself. - */ - public TestDataSettings withData(MLTableJobInput data) { - this.data = data; - 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 TestDataSettings object itself. - */ - public TestDataSettings withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() != null) { - data().validate(); - } - } -} 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 fcc2d0bc84622..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Text Classification task in AutoML NLP vertical. NLP - Natural Language Processing. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("TextClassification") -@Fluent -public final class TextClassification extends AutoMLVertical { - /* - * Primary metric for Text-Classification task. - */ - @JsonProperty(value = "primaryMetric") - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /** - * 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextClassification object itself. - */ - public TextClassification withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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 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; - } - - /** {@inheritDoc} */ - @Override - public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - } -} 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 0b35a8b86b92b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Text Classification Multilabel task in AutoML NLP vertical. NLP - Natural Language Processing. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("TextClassificationMultilabel") -@Fluent -public final class TextClassificationMultilabel extends AutoMLVertical { - /* - * Primary metric for Text-Classification-Multilabel task. - * Currently only Accuracy is supported as primary metric, hence user need - * not set it explicitly. - */ - @JsonProperty(value = "primaryMetric", access = JsonProperty.Access.WRITE_ONLY) - private ClassificationMultilabelPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /** - * 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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 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; - } - - /** {@inheritDoc} */ - @Override - public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - } -} 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 aa93b9e1c0bab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.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.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Text-NER task in AutoML NLP vertical. NER - Named Entity Recognition. NLP - Natural Language Processing. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "taskType") -@JsonTypeName("TextNER") -@Fluent -public final class TextNer extends AutoMLVertical { - /* - * Primary metric for Text-NER task. - * Only 'Accuracy' is supported for Text-NER, so user need not set this - * explicitly. - */ - @JsonProperty(value = "primaryMetric", access = JsonProperty.Access.WRITE_ONLY) - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Data inputs for AutoMLJob. - */ - @JsonProperty(value = "dataSettings") - private NlpVerticalDataSettings dataSettings; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /** - * 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 dataSettings property: Data inputs for AutoMLJob. - * - * @return the dataSettings value. - */ - public NlpVerticalDataSettings dataSettings() { - return this.dataSettings; - } - - /** - * Set the dataSettings property: Data inputs for AutoMLJob. - * - * @param dataSettings the dataSettings value to set. - * @return the TextNer object itself. - */ - public TextNer withDataSettings(NlpVerticalDataSettings dataSettings) { - this.dataSettings = dataSettings; - 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 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; - } - - /** {@inheritDoc} */ - @Override - public TextNer withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (dataSettings() != null) { - dataSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.java deleted file mode 100644 index a6c1a31f294bd..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingDataSettings.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.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Training data input. */ -@Fluent -public final class TrainingDataSettings { - /* - * [Required] Training data MLTable. - */ - @JsonProperty(value = "data", required = true) - private MLTableJobInput data; - - /** - * Get the data property: [Required] Training data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: [Required] Training data MLTable. - * - * @param data the data value to set. - * @return the TrainingDataSettings object itself. - */ - public TrainingDataSettings withData(MLTableJobInput data) { - this.data = data; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property data in model TrainingDataSettings")); - } else { - data().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrainingDataSettings.class); -} 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 6c2ef2bde7b63..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Training related configuration. */ -@Fluent -public final class TrainingSettings { - /* - * Enable recommendation of DNN models. - */ - @JsonProperty(value = "enableDnnTraining") - private Boolean enableDnnTraining; - - /* - * Flag to turn on explainability on best model. - */ - @JsonProperty(value = "enableModelExplainability") - private Boolean enableModelExplainability; - - /* - * Flag for enabling onnx compatible models. - */ - @JsonProperty(value = "enableOnnxCompatibleModels") - private Boolean enableOnnxCompatibleModels; - - /* - * Enable stack ensemble run. - */ - @JsonProperty(value = "enableStackEnsemble") - private Boolean enableStackEnsemble; - - /* - * Enable voting ensemble run. - */ - @JsonProperty(value = "enableVoteEnsemble") - 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. - */ - @JsonProperty(value = "ensembleModelDownloadTimeout") - private Duration ensembleModelDownloadTimeout; - - /* - * Stack ensemble settings for stack ensemble run. - */ - @JsonProperty(value = "stackEnsembleSettings") - private StackEnsembleSettings stackEnsembleSettings; - - /** - * 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; - } - - /** - * 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 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 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 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; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (stackEnsembleSettings() != null) { - stackEnsembleSettings().validate(); - } - } -} 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 5a343d33d2df3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Trial component definition. */ -@Fluent -public final class TrialComponent { - /* - * ARM resource ID of the code asset. - */ - @JsonProperty(value = "codeId") - private String codeId; - - /* - * [Required] The command to execute on startup of the job. eg. "python - * train.py" - */ - @JsonProperty(value = "command", required = true) - private String command; - - /* - * Distribution configuration of the job. If set, this should be one of - * Mpi, Tensorflow, PyTorch, or null. - */ - @JsonProperty(value = "distribution") - private DistributionConfiguration distribution; - - /* - * [Required] The ARM resource ID of the Environment specification for the - * job. - */ - @JsonProperty(value = "environmentId", required = true) - private String environmentId; - - /* - * Environment variables included in the job. - */ - @JsonProperty(value = "environmentVariables") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map environmentVariables; - - /* - * Compute Resource configuration for the job. - */ - @JsonProperty(value = "resources") - private ResourceConfiguration resources; - - /** - * 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 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 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 resources property: Compute Resource configuration for the job. - * - * @return the resources value. - */ - public ResourceConfiguration 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(ResourceConfiguration 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property command in model TrialComponent")); - } - if (distribution() != null) { - distribution().validate(); - } - if (environmentId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property environmentId in model TrialComponent")); - } - if (resources() != null) { - resources().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TrialComponent.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 dde01e0b5fa95..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The TritonModelJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("TritonModel") -@Fluent -public final class TritonModelJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model TritonModelJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(TritonModelJobInput.class); -} 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 87b7ab40bfdd2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The TritonModelJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("TritonModel") -@Fluent -public final class TritonModelJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 13edc38b81166..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Defines an early termination policy that cancels a given percentage of runs at each evaluation interval. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "policyType") -@JsonTypeName("TruncationSelection") -@Fluent -public final class TruncationSelectionPolicy extends EarlyTerminationPolicy { - /* - * The percentage of runs to cancel at each evaluation interval. - */ - @JsonProperty(value = "truncationPercentage") - private Integer truncationPercentage; - - /** - * 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 withDelayEvaluation(Integer delayEvaluation) { - super.withDelayEvaluation(delayEvaluation); - return this; - } - - /** {@inheritDoc} */ - @Override - public TruncationSelectionPolicy withEvaluationInterval(Integer evaluationInterval) { - super.withEvaluationInterval(evaluationInterval); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 2a5c7d53ee3e0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -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 or finds a UnderlyingResourceAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnderlyingResourceAction. - */ - @JsonCreator - 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 032d238fb46ff..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UnitOfMeasure. */ -public final class UnitOfMeasure extends ExpandableStringEnum { - /** Static value OneHour for UnitOfMeasure. */ - public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); - - /** - * Creates or finds a UnitOfMeasure from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnitOfMeasure. - */ - @JsonCreator - 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 7f9aaa6d4f25d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.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.fasterxml.jackson.annotation.JsonProperty; - -/** The properties for update Quota response. */ -@Fluent -public final class UpdateWorkspaceQuotas { - /* - * Specifies the resource ID. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * Specifies the resource type. - */ - @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) - private String type; - - /* - * Limit. The maximum permitted quota of the resource. - */ - @JsonProperty(value = "limit") - private Long limit; - - /* - * An enum describing the unit of quota measurement. - */ - @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) - private QuotaUnit unit; - - /* - * Update Workspace Quota Status. Status of update workspace quota. - */ - @JsonProperty(value = "status") - private Status status; - - /** - * 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: Limit. The maximum permitted quota of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Set the limit property: Limit. 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: Update Workspace Quota Status. Status of update workspace quota. - * - * @return the status value. - */ - public Status status() { - return this.status; - } - - /** - * Set the status property: Update Workspace Quota Status. 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() { - } -} 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 9315ebeaa797a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotasResult.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.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 e604e249f90ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.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.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** uri-file data version entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("UriFile") -@Fluent -public final class UriFileDataVersion extends DataVersionBaseDetails { - /** {@inheritDoc} */ - @Override - public UriFileDataVersion withDataUri(String dataUri) { - super.withDataUri(dataUri); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFileDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFileDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFileDataVersion withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFileDataVersion withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFileDataVersion 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(); - } -} 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 88e20a573df06..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The UriFileJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("UriFile") -@Fluent -public final class UriFileJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model UriFileJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFileJobInput.class); -} 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 559611b1fb637..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The UriFileJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("UriFile") -@Fluent -public final class UriFileJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 2d20dd82ada17..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.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.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import java.util.Map; - -/** uri-folder data version entity. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataType") -@JsonTypeName("UriFolder") -@Fluent -public final class UriFolderDataVersion extends DataVersionBaseDetails { - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion withDataUri(String dataUri) { - super.withDataUri(dataUri); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public UriFolderDataVersion 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(); - } -} 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 7220e2d1e41e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.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.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The UriFolderJobInput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobInputType") -@JsonTypeName("UriFolder") -@Fluent -public final class UriFolderJobInput extends JobInput { - /* - * Input Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private InputDeliveryMode mode; - - /* - * [Required] Input Asset URI. - */ - @JsonProperty(value = "uri", required = true) - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property uri in model UriFolderJobInput")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UriFolderJobInput.class); -} 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 dbe331b23982c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.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.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The UriFolderJobOutput model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "jobOutputType") -@JsonTypeName("UriFolder") -@Fluent -public final class UriFolderJobOutput extends JobOutput { - /* - * Output Asset Delivery Mode. - */ - @JsonProperty(value = "mode") - private OutputDeliveryMode mode; - - /* - * Output Asset URI. - */ - @JsonProperty(value = "uri") - private String uri; - - /** - * 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; - } - - /** - * 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; - } - - /** {@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(); - } -} 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 c98ae6d128078..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usage.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.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 f6a92090d1da0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The Usage Names. */ -@Immutable -public final class UsageName { - /* - * The name of the resource. - */ - @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) - private String value; - - /* - * The localized name of the resource. - */ - @JsonProperty(value = "localizedValue", access = JsonProperty.Access.WRITE_ONLY) - private String localizedValue; - - /** - * 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() { - } -} 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 a7eeee04e822e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UsageUnit. */ -public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - @JsonCreator - 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 829c32dc42506..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Usages.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.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 4e9d2d01c37f1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for UseStl. */ -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 or finds a UseStl from its string representation. - * - * @param name a name to look for. - * @return the corresponding UseStl. - */ - @JsonCreator - 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 9d855264fb741..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.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.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Settings for user account that gets created on each on the nodes of a compute. */ -@Fluent -public final class UserAccountCredentials { - /* - * User name. Name of the administrator user account which can be used to - * SSH to nodes. - */ - @JsonProperty(value = "adminUserName", required = true) - private String adminUsername; - - /* - * SSH public key. SSH public key of the administrator user account. - */ - @JsonProperty(value = "adminUserSshPublicKey") - private String adminUserSshPublicKey; - - /* - * Password. Password of the administrator user account. - */ - @JsonProperty(value = "adminUserPassword") - private String adminUserPassword; - - /** - * Get the adminUsername property: User name. 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: User name. 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. 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. 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. Password of the administrator user account. - * - * @return the adminUserPassword value. - */ - public String adminUserPassword() { - return this.adminUserPassword; - } - - /** - * Set the adminUserPassword property: Password. 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 - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property adminUsername in model UserAccountCredentials")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UserAccountCredentials.class); -} 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 7a11f8067b79c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.UUID; - -/** User assigned identity properties. */ -@Immutable -public class UserAssignedIdentity { - /* - * The principal ID of the assigned identity. - */ - @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) - private UUID principalId; - - /* - * The client ID of the assigned identity. - */ - @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) - private UUID clientId; - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/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 788905e65a242..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.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.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** User identity configuration. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "identityType") -@JsonTypeName("UserIdentity") -@Immutable -public class UserIdentity extends IdentityConfiguration { - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 6390876ef33e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VMPriceOSType. */ -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 or finds a VMPriceOSType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMPriceOSType. - */ - @JsonCreator - 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 f074a5d388ce2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VMTier. */ -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 or finds a VMTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMTier. - */ - @JsonCreator - 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/ValidationDataSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationDataSettings.java deleted file mode 100644 index 9e1610f594e35..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationDataSettings.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Validation settings. */ -@Fluent -public class ValidationDataSettings { - /* - * Validation data MLTable. - */ - @JsonProperty(value = "data") - private MLTableJobInput data; - - /* - * 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. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** - * Get the data property: Validation data MLTable. - * - * @return the data value. - */ - public MLTableJobInput data() { - return this.data; - } - - /** - * Set the data property: Validation data MLTable. - * - * @param data the data value to set. - * @return the ValidationDataSettings object itself. - */ - public ValidationDataSettings withData(MLTableJobInput data) { - this.data = data; - 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 ValidationDataSettings object itself. - */ - public ValidationDataSettings withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (data() != null) { - data().validate(); - } - } -} 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 1a88e58c6177f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ValidationMetricType. */ -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 or finds a ValidationMetricType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValidationMetricType. - */ - @JsonCreator - 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 d41c8042696ce..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ValueFormat. */ -public final class ValueFormat extends ExpandableStringEnum { - /** Static value JSON for ValueFormat. */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - @JsonCreator - 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 e2432e19f599c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** A Machine Learning compute based on Azure Virtual Machines. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("VirtualMachine") -@Fluent -public final class VirtualMachine extends Compute { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private VirtualMachineSchemaProperties properties; - - /** - * 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; - } - - /** {@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(); - } - } -} 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 0f8a928cd8b4a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.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.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Virtual Machine image for Windows AML Compute. */ -@Fluent -public final class VirtualMachineImage { - /* - * Virtual Machine image path - */ - @JsonProperty(value = "id", required = true) - private String id; - - /** - * 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 - .logExceptionAsError( - new IllegalArgumentException("Missing required property id in model VirtualMachineImage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(VirtualMachineImage.class); -} 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 e2c9013f20c70..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The VirtualMachineSchema model. */ -@Fluent -public class VirtualMachineSchema { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private VirtualMachineSchemaProperties properties; - - /** - * 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(); - } - } -} 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 d600ba995792b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The VirtualMachineSchemaProperties model. */ -@Fluent -public final class VirtualMachineSchemaProperties { - /* - * Virtual Machine size - */ - @JsonProperty(value = "virtualMachineSize") - private String virtualMachineSize; - - /* - * Port open for ssh connections. - */ - @JsonProperty(value = "sshPort") - private Integer sshPort; - - /* - * Notebook server port open for ssh connections. - */ - @JsonProperty(value = "notebookServerPort") - private Integer notebookServerPort; - - /* - * Public IP address of the virtual machine. - */ - @JsonProperty(value = "address") - private String address; - - /* - * Admin credentials for virtual machine - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /* - * Indicates whether this compute will be used for running notebooks. - */ - @JsonProperty(value = "isNotebookInstanceCompute") - private Boolean isNotebookInstanceCompute; - - /** - * 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(); - } - } -} 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 ca2ac04360aa1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** Secrets related to a Machine Learning compute based on AKS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "computeType") -@JsonTypeName("VirtualMachine") -@Fluent -public final class VirtualMachineSecrets extends ComputeSecretsInner { - /* - * Admin credentials for virtual machine. - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** - * 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(); - } - } -} 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 a48ebb8b06676..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.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.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The VirtualMachineSecretsSchema model. */ -@Fluent -public class VirtualMachineSecretsSchema { - /* - * Admin credentials for virtual machine. - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** - * 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(); - } - } -} 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 bc3080416502c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Describes the properties of a VM size. */ -@Fluent -public final class VirtualMachineSize { - /* - * Virtual Machine size name The name of the virtual machine size. - */ - @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) - private String name; - - /* - * Virtual Machine family name The family name of the virtual machine size. - */ - @JsonProperty(value = "family", access = JsonProperty.Access.WRITE_ONLY) - private String family; - - /* - * Number of vPUs The number of vCPUs supported by the virtual machine - * size. - */ - @JsonProperty(value = "vCPUs", access = JsonProperty.Access.WRITE_ONLY) - private Integer vCPUs; - - /* - * Number of gPUs The number of gPUs supported by the virtual machine size. - */ - @JsonProperty(value = "gpus", access = JsonProperty.Access.WRITE_ONLY) - private Integer gpus; - - /* - * OS VHD Disk size The OS VHD disk size, in MB, allowed by the virtual - * machine size. - */ - @JsonProperty(value = "osVhdSizeMB", access = JsonProperty.Access.WRITE_ONLY) - private Integer osVhdSizeMB; - - /* - * Resource volume size The resource volume size, in MB, allowed by the - * virtual machine size. - */ - @JsonProperty(value = "maxResourceVolumeMB", access = JsonProperty.Access.WRITE_ONLY) - private Integer maxResourceVolumeMB; - - /* - * Memory size The amount of memory, in GB, supported by the virtual - * machine size. - */ - @JsonProperty(value = "memoryGB", access = JsonProperty.Access.WRITE_ONLY) - private Double memoryGB; - - /* - * Low priority capable Specifies if the virtual machine size supports low - * priority VMs. - */ - @JsonProperty(value = "lowPriorityCapable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean lowPriorityCapable; - - /* - * Premium IO supported Specifies if the virtual machine size supports - * premium IO. - */ - @JsonProperty(value = "premiumIO", access = JsonProperty.Access.WRITE_ONLY) - private Boolean premiumIO; - - /* - * The estimated price information for using a VM. - */ - @JsonProperty(value = "estimatedVMPrices") - private EstimatedVMPrices estimatedVMPrices; - - /* - * Supported Compute Types Specifies the compute types supported by the - * virtual machine size. - */ - @JsonProperty(value = "supportedComputeTypes") - private List supportedComputeTypes; - - /** - * Get the name property: Virtual Machine size name The name of the virtual machine size. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the family property: Virtual Machine family name The family name of the virtual machine size. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Get the vCPUs property: Number of vPUs The number of vCPUs supported by the virtual machine size. - * - * @return the vCPUs value. - */ - public Integer vCPUs() { - return this.vCPUs; - } - - /** - * Get the gpus property: Number of gPUs The number of gPUs supported by the virtual machine size. - * - * @return the gpus value. - */ - public Integer gpus() { - return this.gpus; - } - - /** - * Get the osVhdSizeMB property: OS VHD Disk size 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: Resource volume size 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: Memory size 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: Low priority capable Specifies if the virtual machine size supports low - * priority VMs. - * - * @return the lowPriorityCapable value. - */ - public Boolean lowPriorityCapable() { - return this.lowPriorityCapable; - } - - /** - * Get the premiumIO property: Premium IO supported 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: Supported Compute Types Specifies the compute types supported by the - * virtual machine size. - * - * @return the supportedComputeTypes value. - */ - public List supportedComputeTypes() { - return this.supportedComputeTypes; - } - - /** - * Set the supportedComputeTypes property: Supported Compute Types 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(); - } - } -} 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 ea06dd868660a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizeListResult.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.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 ee81bed746b9a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSizes.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); -} 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 ceb1a64c8c8d0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.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.fasterxml.jackson.annotation.JsonProperty; - -/** Admin credentials for virtual machine. */ -@Fluent -public final class VirtualMachineSshCredentials { - /* - * Username of admin account - */ - @JsonProperty(value = "username") - private String username; - - /* - * Password of admin account - */ - @JsonProperty(value = "password") - private String password; - - /* - * Public key data - */ - @JsonProperty(value = "publicKeyData") - private String publicKeyData; - - /* - * Private key data - */ - @JsonProperty(value = "privateKeyData") - private String privateKeyData; - - /** - * 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() { - } -} 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 4dad28dab83c0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for VmPriority. */ -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 or finds a VmPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmPriority. - */ - @JsonCreator - 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/Weekday.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Weekday.java deleted file mode 100644 index fe113a65753a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Weekday.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 com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for 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 or finds a Weekday from its string representation. - * - * @param name a name to look for. - * @return the corresponding Weekday. - */ - @JsonCreator - 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 d3c6896d3395a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java +++ /dev/null @@ -1,872 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.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 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 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 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.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.WithSharedPrivateLinkResources, - DefinitionStages.WithServiceManagedResourcesSettings, - DefinitionStages.WithPrimaryUserAssignedIdentity { - /** - * 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 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 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); - } - } - /** - * 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.WithPublicNetworkAccess, - UpdateStages.WithApplicationInsights, - UpdateStages.WithContainerRegistry { - /** - * 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 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); - } - } - /** - * 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. - * - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown 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(); - - /** - * 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); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown 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(); - - /** - * 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); - - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown 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 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 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(); - - /** - * 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); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.java deleted file mode 100644 index 448fa89e35a6b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnection.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.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner; - -/** An immutable client-side representation of WorkspaceConnection. */ -public interface WorkspaceConnection { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the category property: Category of the workspace connection. - * - * @return the category value. - */ - String category(); - - /** - * Gets the target property: Target of the workspace connection. - * - * @return the target value. - */ - String target(); - - /** - * Gets the authType property: Authorization type of the workspace connection. - * - * @return the authType value. - */ - String authType(); - - /** - * Gets the value property: Value details of the workspace connection. - * - * @return the value value. - */ - String value(); - - /** - * Gets the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - ValueFormat valueFormat(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionInner object. - * - * @return the inner object. - */ - WorkspaceConnectionInner innerModel(); - - /** The entirety of the WorkspaceConnection definition. */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - /** The WorkspaceConnection definition stages. */ - interface DefinitionStages { - /** The first stage of the WorkspaceConnection definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the WorkspaceConnection 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 WorkspaceConnection 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.WithCategory, - DefinitionStages.WithTarget, - DefinitionStages.WithAuthType, - DefinitionStages.WithValue, - DefinitionStages.WithValueFormat { - /** - * Executes the create request. - * - * @return the created resource. - */ - WorkspaceConnection create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WorkspaceConnection create(Context context); - } - /** The stage of the WorkspaceConnection definition allowing to specify category. */ - interface WithCategory { - /** - * Specifies the category property: Category of the workspace connection.. - * - * @param category Category of the workspace connection. - * @return the next definition stage. - */ - WithCreate withCategory(String category); - } - /** The stage of the WorkspaceConnection definition allowing to specify target. */ - interface WithTarget { - /** - * Specifies the target property: Target of the workspace connection.. - * - * @param target Target of the workspace connection. - * @return the next definition stage. - */ - WithCreate withTarget(String target); - } - /** The stage of the WorkspaceConnection definition allowing to specify authType. */ - interface WithAuthType { - /** - * Specifies the authType property: Authorization type of the workspace connection.. - * - * @param authType Authorization type of the workspace connection. - * @return the next definition stage. - */ - WithCreate withAuthType(String authType); - } - /** The stage of the WorkspaceConnection definition allowing to specify value. */ - interface WithValue { - /** - * Specifies the value property: Value details of the workspace connection.. - * - * @param value Value details of the workspace connection. - * @return the next definition stage. - */ - WithCreate withValue(String value); - } - /** The stage of the WorkspaceConnection definition allowing to specify valueFormat. */ - interface WithValueFormat { - /** - * Specifies the valueFormat property: format for the workspace connection value. - * - * @param valueFormat format for the workspace connection value. - * @return the next definition stage. - */ - WithCreate withValueFormat(ValueFormat valueFormat); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkspaceConnection refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkspaceConnection refresh(Context context); -} 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 d94b5a973c353..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.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.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 { - /** - * List all connections under a AML 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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List all connections under a AML workspace. - * - * @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 paginated list of Workspace connection objects as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection. - */ - WorkspaceConnection get(String resourceGroupName, String workspaceName, String connectionName); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * Delete a workspace connection. - * - * @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); - - /** - * Delete a workspace connection. - * - * @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); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection along with {@link Response}. - */ - WorkspaceConnection getById(String id); - - /** - * Get the detail of a workspace connection. - * - * @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 detail of a workspace connection along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a workspace connection. - * - * @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 a workspace connection. - * - * @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 WorkspaceConnection resource. - * - * @param name resource name. - * @return the first stage of the new WorkspaceConnection definition. - */ - WorkspaceConnection.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 cbbbae1274d2c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.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.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/WorkspaceListResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.java deleted file mode 100644 index cfc2cce4028ca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The result of a request to list machine learning workspaces. */ -@Fluent -public final class WorkspaceListResult { - /* - * 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. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The URI that can be used to request the next list of machine learning - * workspaces. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /** - * 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()); - } - } -} 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 19ad751b16392..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (c) Microsoft Corporation. All 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 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 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/WorkspaceUpdateParameters.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java deleted file mode 100644 index 8687983388fca..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParameters; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The parameters for updating a machine learning workspace. */ -@Fluent -public final class WorkspaceUpdateParameters { - /* - * The resource tags for the machine learning workspace. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /* - * The sku of the workspace. - */ - @JsonProperty(value = "sku") - private Sku sku; - - /* - * The identity of the resource. - */ - @JsonProperty(value = "identity") - private ManagedServiceIdentity identity; - - /* - * The properties that the machine learning workspace will be updated with. - */ - @JsonProperty(value = "properties") - private WorkspacePropertiesUpdateParameters innerProperties; - - /** - * 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 WorkspacePropertiesUpdateParameters 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withPrimaryUserAssignedIdentity(primaryUserAssignedIdentity); - 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - 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 WorkspacePropertiesUpdateParameters(); - } - this.innerProperties().withContainerRegistry(containerRegistry); - 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(); - } - } -} 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 f6d969bb1e61e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.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.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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException 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); - - /** - * 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); - - /** - * 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 deleteByResourceGroup(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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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, 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. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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); - - /** - * 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); - - /** - * 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown 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 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 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 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 2577043eada6c..0000000000000 --- 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 a318a1e7d76bb..0000000000000 --- 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 dd9aa25ecf834..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -module com.azure.resourcemanager.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, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.machinelearning.models to - com.azure.core, - com.fasterxml.jackson.databind; -} 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 eac86beb3de6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentDetails; -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.IdAssetReference; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -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/preview/2022-02-01-preview/examples/BatchDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateBatchDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .batchDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingBatchEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new BatchDeploymentDetails() - .withCodeConfiguration(new CodeConfiguration().withCodeId("string").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withCompute("string") - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new IdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withResources( - new ResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"cd3c37dc-2876-4ca4-8a54-21bd7619724a\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withRetrySettings(new BatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 67c049a0f7340..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.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.Context; - -/** Samples for BatchDeployments Delete. */ -public final class BatchDeploymentsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/delete.json - */ - /** - * Sample code: Delete Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchDeployments() - .delete("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", 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 52763f10899a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.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.Context; - -/** Samples for BatchDeployments Get. */ -public final class BatchDeploymentsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/get.json - */ - /** - * Sample code: Get Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", 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 ebce2bdb39477..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.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.Context; - -/** Samples for BatchDeployments List. */ -public final class BatchDeploymentsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchDeployment/list.json - */ - /** - * Sample code: List Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchDeployments() - .list("test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, 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 a20abef1e2527..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentData; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchRetrySettings; -import com.azure.resourcemanager.machinelearning.models.PartialCodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.PartialIdAssetReference; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; -import java.time.Duration; -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/preview/2022-02-01-preview/examples/BatchDeployment/update.json - */ - /** - * Sample code: Update Batch Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateBatchDeployment(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchDeploymentData resource = - manager - .batchDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchDeployment() - .withCodeConfiguration( - new PartialCodeConfiguration().withCodeId("string").withScoringScript("string")) - .withCompute("string") - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withErrorThreshold(1) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(1) - .withMiniBatchSize(1L) - .withModel(new PartialIdAssetReference().withAssetId("string")) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("string") - .withProperties(mapOf("string", "string")) - .withRetrySettings( - new PartialBatchRetrySettings().withMaxRetries(1).withTimeout(Duration.parse("PT5M")))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 349da87e66582..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsCreateOrUpdateSamples.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.BatchEndpointDefaults; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDetails; -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/preview/2022-02-01-preview/examples/BatchEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateBatchEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .batchEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new BatchEndpointDetails() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 a8f44bb8de564..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteSamples.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.Context; - -/** Samples for BatchEndpoints Delete. */ -public final class BatchEndpointsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/delete.json - */ - /** - * Sample code: Delete Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints().delete("resourceGroup-1234", "testworkspace", "testBatchEndpoint", 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 19442d7d653ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.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.Context; - -/** Samples for BatchEndpoints Get. */ -public final class BatchEndpointsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/get.json - */ - /** - * Sample code: Get Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", 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 88843178691a0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.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.Context; - -/** Samples for BatchEndpoints ListKeys. */ -public final class BatchEndpointsListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/listKeys.json - */ - /** - * Sample code: ListKeys Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listKeysBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", 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 98907210c6366..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.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.Context; - -/** Samples for BatchEndpoints List. */ -public final class BatchEndpointsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/BatchEndpoint/list.json - */ - /** - * Sample code: List Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.batchEndpoints().list("test-rg", "my-aml-workspace", 1, null, 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 beaf253040887..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialBatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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/preview/2022-02-01-preview/examples/BatchEndpoint/update.json - */ - /** - * Sample code: Update Batch Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateBatchEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - BatchEndpointData resource = - manager - .batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties( - new PartialBatchEndpoint().withDefaults(new BatchEndpointDefaults().withDeploymentName("string"))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 f31367a571603..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateSamples.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.resourcemanager.machinelearning.models.CodeContainerDetails; -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/preview/2022-02-01-preview/examples/CodeContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateCodeContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .codeContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new CodeContainerDetails() - .withDescription("string") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 71c42219e3457..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteSamples.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.Context; - -/** Samples for CodeContainers Delete. */ -public final class CodeContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/delete.json - */ - /** - * Sample code: Delete Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", 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 4d56a219f3b04..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.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.Context; - -/** Samples for CodeContainers Get. */ -public final class CodeContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/get.json - */ - /** - * Sample code: Get Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers().getWithResponse("testrg123", "testworkspace", "testContainer", 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 69615834acacc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.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.Context; - -/** Samples for CodeContainers List. */ -public final class CodeContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeContainer/list.json - */ - /** - * Sample code: List Code Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listCodeContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeContainers().list("testrg123", "testworkspace", null, 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 1ad229f94eb90..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.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.CodeVersionDetails; -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/preview/2022-02-01-preview/examples/CodeVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateCodeVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .codeVersions() - .define("string") - .withExistingCode("test-rg", "my-aml-workspace", "string") - .withProperties( - new CodeVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("https://blobStorage/folderName")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 2b63aece4d952..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteSamples.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.Context; - -/** Samples for CodeVersions Delete. */ -public final class CodeVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/delete.json - */ - /** - * Sample code: Delete Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 67de6bacaf377..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.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.Context; - -/** Samples for CodeVersions Get. */ -public final class CodeVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/get.json - */ - /** - * Sample code: Get Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 79352a832f3ec..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.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.Context; - -/** Samples for CodeVersions List. */ -public final class CodeVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/CodeVersion/list.json - */ - /** - * Sample code: List Code Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listCodeVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.codeVersions().list("test-rg", "my-aml-workspace", "string", "string", 1, null, 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 98a987107b8ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.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.resourcemanager.machinelearning.models.ComponentContainerDetails; -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/preview/2022-02-01-preview/examples/ComponentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateComponentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentContainers() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ComponentContainerDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string"))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 1c013acc405a9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteSamples.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.Context; - -/** Samples for ComponentContainers Delete. */ -public final class ComponentContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/delete.json - */ - /** - * Sample code: Delete Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteComponentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers().deleteWithResponse("test-rg", "my-aml-workspace", "string", 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 263dcdff41a98..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.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.Context; - -/** Samples for ComponentContainers Get. */ -public final class ComponentContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/get.json - */ - /** - * Sample code: Get Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComponentContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers().getWithResponse("test-rg", "my-aml-workspace", "string", 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 7178143bf2dd0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.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.Context; - -/** Samples for ComponentContainers List. */ -public final class ComponentContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentContainer/list.json - */ - /** - * Sample code: List Component Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listComponentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentContainers().list("test-rg", "my-aml-workspace", null, null, 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 9a68d798b013f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionDetails; -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/preview/2022-02-01-preview/examples/ComponentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateComponentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .componentVersions() - .define("string") - .withExistingComponent("test-rg", "my-aml-workspace", "string") - .withProperties( - new ComponentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withComponentSpec( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"8ced901b-d826-477d-bfef-329da9672513\":null}", - Object.class, - SerializerEncoding.JSON))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 fc97506a5b550..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteSamples.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.Context; - -/** Samples for ComponentVersions Delete. */ -public final class ComponentVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/delete.json - */ - /** - * Sample code: Delete Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteComponentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 bc8884e516491..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.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.Context; - -/** Samples for ComponentVersions Get. */ -public final class ComponentVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/get.json - */ - /** - * Sample code: Get Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.componentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 24bfff55e2862..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.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.Context; - -/** Samples for ComponentVersions List. */ -public final class ComponentVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ComponentVersion/list.json - */ - /** - * Sample code: List Component Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listComponentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .componentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, 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 10e44a1114e6d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.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.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.DataFactory; -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.RemoteLoginPortPublicAccess; -import com.azure.resourcemanager.machinelearning.models.ResourceId; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.SshPublicAccess; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; -import com.azure.resourcemanager.machinelearning.models.VmPriority; -import java.time.Duration; -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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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)) - .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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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/preview/2022-02-01-preview/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(); - } - - @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 946a49b311631..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.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.Context; -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/preview/2022-02-01-preview/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, 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 315fc0b9667eb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.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.Context; - -/** Samples for Compute Get. */ -public final class ComputeGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 47910d43d61d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.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.Context; - -/** Samples for Compute ListKeys. */ -public final class ComputeListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 c0804e8830f87..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.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.Context; - -/** Samples for Compute ListNodes. */ -public final class ComputeListNodesSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 e934364e53614..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.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.Context; - -/** Samples for Compute List. */ -public final class ComputeListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, 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 24446e5c0afe0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.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.Context; - -/** Samples for Compute Restart. */ -public final class ComputeRestartSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 4dffc86033dd5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.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.Context; - -/** Samples for Compute Start. */ -public final class ComputeStartSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 97a2961ce90de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.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.Context; - -/** Samples for Compute Stop. */ -public final class ComputeStopSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 aa62d2b897405..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.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.Context; -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/preview/2022-02-01-preview/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", 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 2a455cb7025e5..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.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.DataContainerDetails; -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/preview/2022-02-01-preview/examples/DataContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDataContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .dataContainers() - .define("datacontainer123") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new DataContainerDetails() - .withDescription("string") - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.URI_FILE)) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 6677dbc8a6232..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteSamples.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.Context; - -/** Samples for DataContainers Delete. */ -public final class DataContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/delete.json - */ - /** - * Sample code: Delete Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().deleteWithResponse("testrg123", "workspace123", "datacontainer123", 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 13a752ba4e0ab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.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.Context; - -/** Samples for DataContainers Get. */ -public final class DataContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/get.json - */ - /** - * Sample code: Get Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().getWithResponse("testrg123", "workspace123", "datacontainer123", 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 9615c1761d32f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.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.Context; - -/** Samples for DataContainers List. */ -public final class DataContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataContainer/list.json - */ - /** - * Sample code: List Data Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listDataContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataContainers().list("testrg123", "workspace123", null, null, 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 b63f9f6aca9a6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.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.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/preview/2022-02-01-preview/examples/DataVersionBase/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDataVersionBase( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .dataVersions() - .define("string") - .withExistingData("test-rg", "my-aml-workspace", "string") - .withProperties( - new UriFileDataVersion() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withDataUri("string")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 9a2828b9b5f23..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteSamples.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.Context; - -/** Samples for DataVersions Delete. */ -public final class DataVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/delete.json - */ - /** - * Sample code: Delete Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 3ea2798ad6ee0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.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.Context; - -/** Samples for DataVersions Get. */ -public final class DataVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/get.json - */ - /** - * Sample code: Get Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.dataVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 e2998d0c46a2b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.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.Context; - -/** Samples for DataVersions List. */ -public final class DataVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/DataVersionBase/list.json - */ - /** - * Sample code: List Data Version Base. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listDataVersionBase(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .dataVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, "string", null, 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 d01c903545932..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.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.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/preview/2022-02-01-preview/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") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("string")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withStoreName("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets(new ServicePrincipalDatastoreSecrets().withClientSecret("string")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withAccountName("string") - .withEndpoint("string") - .withFilesystem("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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("string"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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("string"))) - .withAccountName("string") - .withEndpoint("string") - .withFileShareName("string") - .withProtocol("string")) - .withSkipValidation(false) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 048a0689cb9ad..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteSamples.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.Context; - -/** Samples for Datastores Delete. */ -public final class DatastoresDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 362b7d5443840..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.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.Context; - -/** Samples for Datastores Get. */ -public final class DatastoresGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 6d6bfc02cfbab..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.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.Context; -import java.util.Arrays; - -/** Samples for Datastores List. */ -public final class DatastoresListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, - 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 6c73e14c35797..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.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.Context; - -/** Samples for Datastores ListSecrets. */ -public final class DatastoresListSecretsSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 a1164dbfb388e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.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.EnvironmentContainerDetails; -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/preview/2022-02-01-preview/examples/EnvironmentContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentContainers() - .define("testEnvironment") - .withExistingWorkspace("testrg123", "testworkspace") - .withProperties( - new EnvironmentContainerDetails() - .withDescription("string") - .withProperties( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string")) - .withTags( - mapOf("additionalProp1", "string", "additionalProp2", "string", "additionalProp3", "string"))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 d82d3bc9a1eb0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteSamples.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.Context; - -/** Samples for EnvironmentContainers Delete. */ -public final class EnvironmentContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/delete.json - */ - /** - * Sample code: Delete Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers().deleteWithResponse("testrg123", "testworkspace", "testContainer", 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 234e62e20f55e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.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.Context; - -/** Samples for EnvironmentContainers Get. */ -public final class EnvironmentContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/get.json - */ - /** - * Sample code: Get Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers().getWithResponse("testrg123", "testworkspace", "testEnvironment", 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 4d98d298ac4de..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.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.Context; - -/** Samples for EnvironmentContainers List. */ -public final class EnvironmentContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentContainer/list.json - */ - /** - * Sample code: List Environment Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listEnvironmentContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentContainers().list("testrg123", "testworkspace", null, null, 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 895d59ee9e49d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.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.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionDetails; -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/preview/2022-02-01-preview/examples/EnvironmentVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .define("string") - .withExistingEnvironment("test-rg", "my-aml-workspace", "string") - .withProperties( - new EnvironmentVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withBuild( - new BuildContext() - .withContextUri( - "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/") - .withDockerfilePath("prod/Dockerfile")) - .withCondaFile("string") - .withImage("docker.io/tensorflow/serving:latest") - .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(); - } - - @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 6b75b32b0a58e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.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.Context; - -/** Samples for EnvironmentVersions Delete. */ -public final class EnvironmentVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/delete.json - */ - /** - * Sample code: Delete Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 e4ef8171ec78e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.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.Context; - -/** Samples for EnvironmentVersions Get. */ -public final class EnvironmentVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/get.json - */ - /** - * Sample code: Get Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getEnvironmentVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.environmentVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 36b3677194fae..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.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.Context; - -/** Samples for EnvironmentVersions List. */ -public final class EnvironmentVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/EnvironmentVersion/list.json - */ - /** - * Sample code: List Environment Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listEnvironmentVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .environmentVersions() - .list("test-rg", "my-aml-workspace", "string", "string", 1, null, null, 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 e6df172f25aa6..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.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.Context; - -/** Samples for Jobs Cancel. */ -public final class JobsCancelSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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().cancelWithResponse("test-rg", "my-aml-workspace", "string", 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 a9e4a13e060ee..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.CronSchedule; -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.ImageVerticalDataSettings; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -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.ResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -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.TrainingDataSettings; -import com.azure.resourcemanager.machinelearning.models.TrialComponent; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import java.io.IOException; -import java.time.Duration; -import java.time.OffsetDateTime; -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/preview/2022-02-01-preview/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") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withIdentity(new AmlToken()) - .withIsArchived(false) - .withSchedule( - new CronSchedule() - .withEndTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withScheduleStatus(ScheduleStatus.DISABLED) - .withStartTime(OffsetDateTime.parse("2020-01-01T12:34:56.999Z")) - .withTimeZone("string") - .withExpression("string")) - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("string"))) - .withResources( - new ResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withTaskDetails( - new ImageClassification() - .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withValidationCropSize("choice(2, 360)"))) - .withDataSettings( - new ImageVerticalDataSettings() - .withTargetColumnName("string") - .withTrainingData( - new TrainingDataSettings().withData(new MLTableJobInput().withUri("string")))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withEarlyTermination(new MedianStoppingPolicy().withDelayEvaluation(1).withEvaluationInterval(1)) - .withLimits( - new SweepJobLimits() - .withMaxConcurrentTrials(1) - .withMaxTotalTrials(1) - .withTrialTimeout(Duration.parse("PT1S"))) - .withObjective(new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("string")) - .withSamplingAlgorithm(new GridSamplingAlgorithm()) - .withSearchSpace( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{\"string\":{}}", Object.class, SerializerEncoding.JSON)) - .withTrial( - new TrialComponent() - .withCodeId("string") - .withCommand("string") - .withDistribution(new Mpi().withProcessCountPerInstance(1)) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withResources( - new ResourceConfiguration() - .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/preview/2022-02-01-preview/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") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.UPLOAD) - .withUri("string"))) - .withSettings( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withIdentity(new AmlToken()) - .withServices( - mapOf( - "string", - new JobService() - .withEndpoint("string") - .withJobServiceType("string") - .withPort(1) - .withProperties(mapOf("string", "string")))) - .withCodeId("string") - .withCommand("string") - .withDistribution(new TensorFlow().withParameterServerCount(1).withWorkerCount(1)) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withInputs(mapOf("string", new LiteralJobInput().withDescription("string").withValue("string"))) - .withLimits(new CommandJobLimits().withTimeout(Duration.parse("PT5M"))) - .withOutputs( - mapOf( - "string", - new UriFileJobOutput() - .withDescription("string") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("string"))) - .withResources( - new ResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", - Object.class, - SerializerEncoding.JSON))))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 2f4693836fa99..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.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.Context; - -/** Samples for Jobs Delete. */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", "string", 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 15b7b3b2ead51..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.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.Context; - -/** Samples for Jobs Get. */ -public final class JobsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 e4847e10f0843..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.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.Context; - -/** Samples for Jobs List. */ -public final class JobsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, null, Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, null, Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, null, Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, null, 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 9e3ef93b92616..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.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.resourcemanager.machinelearning.models.ModelContainerDetails; -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/preview/2022-02-01-preview/examples/ModelContainer/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateModelContainer( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelContainers() - .define("testContainer") - .withExistingWorkspace("testrg123", "workspace123") - .withProperties( - new ModelContainerDetails() - .withDescription("Model container description") - .withTags(mapOf("tag1", "value1", "tag2", "value2"))) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 cef9bf1c56c97..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteSamples.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.Context; - -/** Samples for ModelContainers Delete. */ -public final class ModelContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/delete.json - */ - /** - * Sample code: Delete Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers().deleteWithResponse("testrg123", "workspace123", "testContainer", 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 9a468e4f8c679..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.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.Context; - -/** Samples for ModelContainers Get. */ -public final class ModelContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/get.json - */ - /** - * Sample code: Get Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers().getWithResponse("testrg123", "workspace123", "testContainer", 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 2f03b11e36326..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.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.Context; - -/** Samples for ModelContainers List. */ -public final class ModelContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelContainer/list.json - */ - /** - * Sample code: List Model Container. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listModelContainer(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelContainers().list("testrg123", "workspace123", null, null, null, 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 4182de281143c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.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.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelType; -import com.azure.resourcemanager.machinelearning.models.ModelVersionDetails; -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/preview/2022-02-01-preview/examples/ModelVersion/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateModelVersion( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .modelVersions() - .define("string") - .withExistingModel("test-rg", "my-aml-workspace", "string") - .withProperties( - new ModelVersionDetails() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType(ModelType.CUSTOM_MODEL) - .withModelUri("string")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 5abcd0f8d1dba..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteSamples.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.Context; - -/** Samples for ModelVersions Delete. */ -public final class ModelVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/delete.json - */ - /** - * Sample code: Delete Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions().deleteWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 78aff7dce52d1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.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.Context; - -/** Samples for ModelVersions Get. */ -public final class ModelVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/get.json - */ - /** - * Sample code: Get Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getModelVersion(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.modelVersions().getWithResponse("test-rg", "my-aml-workspace", "string", "string", 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 921cc20186a12..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.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.Context; - -/** Samples for ModelVersions List. */ -public final class ModelVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/ModelVersion/list.json - */ - /** - * Sample code: List Model Version. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listModelVersion(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, - 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 ce44ed3359165..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.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.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/preview/2022-02-01-preview/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() - .withCodeConfiguration(new CodeConfiguration().withCodeId("string").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withAppInsightsEnabled(false) - .withInstanceType("string") - .withLivenessProbe( - new ProbeSettings() - .withFailureThreshold(1) - .withInitialDelay(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M"))) - .withModel("string") - .withModelMountPath("string") - .withRequestSettings( - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1) - .withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M"))) - .withScaleSettings(new DefaultScaleSettings()) - .withContainerResourceRequirements( - new ContainerResourceRequirements() - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("\"1\"").withGpu("\"1\"").withMemory("\"2Gi\"")) - .withContainerResourceRequests( - new ContainerResourceSettings() - .withCpu("\"1\"") - .withGpu("\"1\"") - .withMemory("\"2Gi\"")))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .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/preview/2022-02-01-preview/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() - .withCodeConfiguration(new CodeConfiguration().withCodeId("string").withScoringScript("string")) - .withDescription("string") - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withProperties(mapOf("string", "string")) - .withAppInsightsEnabled(false) - .withInstanceType("string") - .withLivenessProbe( - new ProbeSettings() - .withFailureThreshold(1) - .withInitialDelay(Duration.parse("PT5M")) - .withPeriod(Duration.parse("PT5M")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT5M"))) - .withModel("string") - .withModelMountPath("string") - .withReadinessProbe( - new ProbeSettings() - .withFailureThreshold(30) - .withInitialDelay(Duration.parse("PT1S")) - .withPeriod(Duration.parse("PT10S")) - .withSuccessThreshold(1) - .withTimeout(Duration.parse("PT2S"))) - .withRequestSettings( - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1) - .withMaxQueueWait(Duration.parse("PT5M")) - .withRequestTimeout(Duration.parse("PT5M"))) - .withScaleSettings(new DefaultScaleSettings())) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 bdb98001c5bd1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteSamples.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.Context; - -/** Samples for OnlineDeployments Delete. */ -public final class OnlineDeploymentsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineDeployment/delete.json - */ - /** - * Sample code: Delete Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineDeployments().delete("testrg123", "workspace123", "testEndpoint", "testDeployment", 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 adefe6402f012..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.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.Context; -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/preview/2022-02-01-preview/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), - 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 5884827c3109f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.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.Context; - -/** Samples for OnlineDeployments Get. */ -public final class OnlineDeploymentsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 8e453a170fff9..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.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.Context; - -/** Samples for OnlineDeployments List. */ -public final class OnlineDeploymentsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, 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 09e54d2564458..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.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.Context; - -/** Samples for OnlineDeployments ListSkus. */ -public final class OnlineDeploymentsListSkusSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, 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 3dff73c3bfa28..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentData; -import com.azure.resourcemanager.machinelearning.models.PartialKubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.io.IOException; -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/preview/2022-02-01-preview/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) throws IOException { - OnlineDeploymentData resource = - manager - .onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialManagedOnlineDeployment()) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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) throws IOException { - OnlineDeploymentData resource = - manager - .onlineDeployments() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", "testDeploymentName", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialKubernetesOnlineDeployment()) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 618d1d9e5d70c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsCreateOrUpdateSamples.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.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointDetails; -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/preview/2022-02-01-preview/examples/OnlineEndpoint/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .define("testEndpointName") - .withRegion("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new OnlineEndpointDetails() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withCompute("string") - .withTraffic(mapOf("string", 1))) - .withTags(mapOf()) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("string", new UserAssignedIdentity()))) - .withKind("string") - .withSku( - new Sku() - .withName("string") - .withTier(SkuTier.FREE) - .withSize("string") - .withFamily("string") - .withCapacity(1)) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 c0fd01296b3bb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteSamples.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.Context; - -/** Samples for OnlineEndpoints Delete. */ -public final class OnlineEndpointsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/delete.json - */ - /** - * Sample code: Delete Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints().delete("test-rg", "my-aml-workspace", "testEndpointName", 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 8edd8ba5add5c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.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.Context; - -/** Samples for OnlineEndpoints Get. */ -public final class OnlineEndpointsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/get.json - */ - /** - * Sample code: Get Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints().getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", 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 3707e6893a62e..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.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.Context; - -/** Samples for OnlineEndpoints GetToken. */ -public final class OnlineEndpointsGetTokenSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/getToken.json - */ - /** - * Sample code: GetToken Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getTokenOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints().getTokenWithResponse("test-rg", "my-aml-workspace", "testEndpointName", 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 59d2d9bd2be78..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.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.Context; - -/** Samples for OnlineEndpoints ListKeys. */ -public final class OnlineEndpointsListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/examples/OnlineEndpoint/listKeys.json - */ - /** - * Sample code: ListKeys Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listKeysOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.onlineEndpoints().listKeysWithResponse("test-rg", "my-aml-workspace", "testEndpointName", 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 bf76e04c91c36..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.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.Context; -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/preview/2022-02-01-preview/examples/OnlineEndpoint/list.json - */ - /** - * Sample code: List Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOnlineEndpoint(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, - 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 1d9abdecc725c..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.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.Context; -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/preview/2022-02-01-preview/examples/OnlineEndpoint/regenerateKeys.json - */ - /** - * Sample code: RegenerateKeys Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void regenerateKeysOnlineEndpoint( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineEndpoints() - .regenerateKeys( - "test-rg", - "my-aml-workspace", - "testEndpointName", - new RegenerateEndpointKeysRequest().withKeyType(KeyType.PRIMARY).withKeyValue("string"), - 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 9c28f07a0c0e2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointData; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialOnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -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/preview/2022-02-01-preview/examples/OnlineEndpoint/update.json - */ - /** - * Sample code: Update Online Endpoint. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateOnlineEndpoint(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - OnlineEndpointData resource = - manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .withKind("string") - .withProperties(new PartialOnlineEndpoint().withTraffic(mapOf("string", 1))) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 9f6e24ddf75bf..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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(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 adae22be8eefc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.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.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/preview/2022-02-01-preview/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 d3c1d5fb9cd7a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.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.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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}", 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 ca77172dacf61..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.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.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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}", 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 8a19dca8e6920..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.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.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 6856fcce03df0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.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.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 d8b5cac81338a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.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.Context; - -/** Samples for Quotas List. */ -public final class QuotasListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 858972271aaa3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.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.Context; -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/preview/2022-02-01-preview/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))), - Context.NONE); - } -} 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 be1aaf51c237d..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.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.Context; - -/** Samples for Usages List. */ -public final class UsagesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 2419e5ae92a08..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.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.Context; - -/** Samples for VirtualMachineSizes List. */ -public final class VirtualMachineSizesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 491234c7d941b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.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; - -/** Samples for WorkspaceConnections Create. */ -public final class WorkspaceConnectionsCreateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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") - .withCategory("ACR") - .withTarget("www.facebook.com") - .withAuthType("PAT") - .withValue("secrets") - .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 87562608439c2..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.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.Context; - -/** Samples for WorkspaceConnections Delete. */ -public final class WorkspaceConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 53c250dcd90bc..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.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.Context; - -/** Samples for WorkspaceConnections Get. */ -public final class WorkspaceConnectionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 6277f375754f3..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.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.Context; - -/** Samples for WorkspaceConnections List. */ -public final class WorkspaceConnectionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", "ACR", 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 cb6c47bf13dd0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.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.Context; - -/** Samples for WorkspaceFeatures List. */ -public final class WorkspaceFeaturesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 b4e2b9f950d4f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.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.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/preview/2022-02-01-preview/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( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") - .withKeyIdentifier( - "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb") - .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(); - } - - @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 1aef475b3992a..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.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.Context; - -/** Samples for Workspaces Delete. */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 5b33bfb24009f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.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.Context; -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/preview/2022-02-01-preview/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())), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/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 bb84f84805f18..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesGetByResourceGroupSamples.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.Context; - -/** Samples for Workspaces GetByResourceGroup. */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 f5f83077eb3d4..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.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.Context; - -/** Samples for Workspaces ListByResourceGroup. */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, 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 df4927c6259aa..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.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.Context; - -/** Samples for Workspaces ListKeys. */ -public final class WorkspacesListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 34f02920a33b1..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.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.Context; - -/** Samples for Workspaces ListNotebookAccessToken. */ -public final class WorkspacesListNotebookAccessTokenSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 5ab643e5d4d7b..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.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.Context; - -/** Samples for Workspaces ListNotebookKeys. */ -public final class WorkspacesListNotebookKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 72632cc487547..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.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.Context; - -/** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ -public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 e6fcdfa952b8f..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.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.Context; - -/** Samples for Workspaces List. */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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, 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 c9800f875ebe0..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.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.Context; - -/** Samples for Workspaces ListStorageAccountKeys. */ -public final class WorkspacesListStorageAccountKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 64f0f16a6cbbb..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.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.Context; - -/** Samples for Workspaces PrepareNotebook. */ -public final class WorkspacesPrepareNotebookSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 4871b9e5f7099..0000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.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.Context; - -/** Samples for Workspaces ResyncKeys. */ -public final class WorkspacesResyncKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/preview/2022-02-01-preview/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", 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 3cffa00b21bc9..0000000000000 --- 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.core.util.Context; -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/preview/2022-02-01-preview/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", Context.NONE) - .getValue(); - resource - .update() - .withDescription("new description") - .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .apply(); - } -}