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 a212fe3e6c4a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/MachineLearningManager.java +++ /dev/null @@ -1,703 +0,0 @@ -// Copyright (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.SchedulesImpl; -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.Schedules; -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 Schedules schedules; - - 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"); - if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new MachineLearningManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of Workspaces. It manages Workspace. - * - * @return Resource collection API of Workspaces. - */ - public Workspaces workspaces() { - if (this.workspaces == null) { - this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this); - } - return workspaces; - } - - /** - * Gets the resource collection API of Usages. - * - * @return Resource collection API of Usages. - */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** - * Gets the resource collection API of VirtualMachineSizes. - * - * @return Resource collection API of VirtualMachineSizes. - */ - public VirtualMachineSizes virtualMachineSizes() { - if (this.virtualMachineSizes == null) { - this.virtualMachineSizes = new VirtualMachineSizesImpl(clientObject.getVirtualMachineSizes(), this); - } - return virtualMachineSizes; - } - - /** - * Gets the resource collection API of Quotas. - * - * @return Resource collection API of Quotas. - */ - public Quotas quotas() { - if (this.quotas == null) { - this.quotas = new QuotasImpl(clientObject.getQuotas(), this); - } - return quotas; - } - - /** - * Gets the resource collection API of Computes. It manages ComputeResource. - * - * @return Resource collection API of Computes. - */ - public Computes computes() { - if (this.computes == null) { - this.computes = new ComputesImpl(clientObject.getComputes(), this); - } - return computes; - } - - /** - * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. - * - * @return Resource collection API of PrivateEndpointConnections. - */ - public PrivateEndpointConnections privateEndpointConnections() { - if (this.privateEndpointConnections == null) { - this.privateEndpointConnections = - new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); - } - return privateEndpointConnections; - } - - /** - * Gets the resource collection API of PrivateLinkResources. - * - * @return Resource collection API of PrivateLinkResources. - */ - public PrivateLinkResources privateLinkResources() { - if (this.privateLinkResources == null) { - this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); - } - return privateLinkResources; - } - - /** - * Gets the resource collection API of WorkspaceConnections. It manages - * WorkspaceConnectionPropertiesV2BasicResource. - * - * @return Resource collection API of WorkspaceConnections. - */ - public WorkspaceConnections workspaceConnections() { - if (this.workspaceConnections == null) { - this.workspaceConnections = new WorkspaceConnectionsImpl(clientObject.getWorkspaceConnections(), this); - } - return workspaceConnections; - } - - /** - * Gets the resource collection API of BatchEndpoints. It manages BatchEndpoint. - * - * @return Resource collection API of BatchEndpoints. - */ - public BatchEndpoints batchEndpoints() { - if (this.batchEndpoints == null) { - this.batchEndpoints = new BatchEndpointsImpl(clientObject.getBatchEndpoints(), this); - } - return batchEndpoints; - } - - /** - * Gets the resource collection API of BatchDeployments. It manages BatchDeployment. - * - * @return Resource collection API of BatchDeployments. - */ - public BatchDeployments batchDeployments() { - if (this.batchDeployments == null) { - this.batchDeployments = new BatchDeploymentsImpl(clientObject.getBatchDeployments(), this); - } - return batchDeployments; - } - - /** - * Gets the resource collection API of CodeContainers. It manages CodeContainer. - * - * @return Resource collection API of CodeContainers. - */ - public CodeContainers codeContainers() { - if (this.codeContainers == null) { - this.codeContainers = new CodeContainersImpl(clientObject.getCodeContainers(), this); - } - return codeContainers; - } - - /** - * Gets the resource collection API of CodeVersions. It manages CodeVersion. - * - * @return Resource collection API of CodeVersions. - */ - public CodeVersions codeVersions() { - if (this.codeVersions == null) { - this.codeVersions = new CodeVersionsImpl(clientObject.getCodeVersions(), this); - } - return codeVersions; - } - - /** - * Gets the resource collection API of ComponentContainers. It manages ComponentContainer. - * - * @return Resource collection API of ComponentContainers. - */ - public ComponentContainers componentContainers() { - if (this.componentContainers == null) { - this.componentContainers = new ComponentContainersImpl(clientObject.getComponentContainers(), this); - } - return componentContainers; - } - - /** - * Gets the resource collection API of ComponentVersions. It manages ComponentVersion. - * - * @return Resource collection API of ComponentVersions. - */ - public ComponentVersions componentVersions() { - if (this.componentVersions == null) { - this.componentVersions = new ComponentVersionsImpl(clientObject.getComponentVersions(), this); - } - return componentVersions; - } - - /** - * Gets the resource collection API of DataContainers. It manages DataContainer. - * - * @return Resource collection API of DataContainers. - */ - public DataContainers dataContainers() { - if (this.dataContainers == null) { - this.dataContainers = new DataContainersImpl(clientObject.getDataContainers(), this); - } - return dataContainers; - } - - /** - * Gets the resource collection API of DataVersions. It manages DataVersionBase. - * - * @return Resource collection API of DataVersions. - */ - public DataVersions dataVersions() { - if (this.dataVersions == null) { - this.dataVersions = new DataVersionsImpl(clientObject.getDataVersions(), this); - } - return dataVersions; - } - - /** - * Gets the resource collection API of Datastores. It manages Datastore. - * - * @return Resource collection API of Datastores. - */ - public Datastores datastores() { - if (this.datastores == null) { - this.datastores = new DatastoresImpl(clientObject.getDatastores(), this); - } - return datastores; - } - - /** - * Gets the resource collection API of EnvironmentContainers. It manages EnvironmentContainer. - * - * @return Resource collection API of EnvironmentContainers. - */ - public EnvironmentContainers environmentContainers() { - if (this.environmentContainers == null) { - this.environmentContainers = new EnvironmentContainersImpl(clientObject.getEnvironmentContainers(), this); - } - return environmentContainers; - } - - /** - * Gets the resource collection API of EnvironmentVersions. It manages EnvironmentVersion. - * - * @return Resource collection API of EnvironmentVersions. - */ - public EnvironmentVersions environmentVersions() { - if (this.environmentVersions == null) { - this.environmentVersions = new EnvironmentVersionsImpl(clientObject.getEnvironmentVersions(), this); - } - return environmentVersions; - } - - /** - * Gets the resource collection API of Jobs. It manages JobBase. - * - * @return Resource collection API of Jobs. - */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - return jobs; - } - - /** - * Gets the resource collection API of ModelContainers. It manages ModelContainer. - * - * @return Resource collection API of ModelContainers. - */ - public ModelContainers modelContainers() { - if (this.modelContainers == null) { - this.modelContainers = new ModelContainersImpl(clientObject.getModelContainers(), this); - } - return modelContainers; - } - - /** - * Gets the resource collection API of ModelVersions. It manages ModelVersion. - * - * @return Resource collection API of ModelVersions. - */ - public ModelVersions modelVersions() { - if (this.modelVersions == null) { - this.modelVersions = new ModelVersionsImpl(clientObject.getModelVersions(), this); - } - return modelVersions; - } - - /** - * Gets the resource collection API of OnlineEndpoints. It manages OnlineEndpoint. - * - * @return Resource collection API of OnlineEndpoints. - */ - public OnlineEndpoints onlineEndpoints() { - if (this.onlineEndpoints == null) { - this.onlineEndpoints = new OnlineEndpointsImpl(clientObject.getOnlineEndpoints(), this); - } - return onlineEndpoints; - } - - /** - * Gets the resource collection API of OnlineDeployments. It manages OnlineDeployment. - * - * @return Resource collection API of OnlineDeployments. - */ - public OnlineDeployments onlineDeployments() { - if (this.onlineDeployments == null) { - this.onlineDeployments = new OnlineDeploymentsImpl(clientObject.getOnlineDeployments(), this); - } - return onlineDeployments; - } - - /** - * Gets the resource collection API of Schedules. It manages Schedule. - * - * @return Resource collection API of Schedules. - */ - public Schedules schedules() { - if (this.schedules == null) { - this.schedules = new SchedulesImpl(clientObject.getSchedules(), this); - } - return schedules; - } - - /** - * Gets the resource collection API of 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 e8a40ef9b43c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/AzureMachineLearningWorkspaces.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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 SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - SchedulesClient getSchedules(); - - /** - * 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 f2ba7f59facb..000000000000 --- 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.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; - -/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ -public interface BatchDeploymentsClient { - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body); - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body); - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java deleted file mode 100644 index 4f335ddcec44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/BatchEndpointsClient.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; - -/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ -public interface BatchEndpointsClient { - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body); - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeContainersClient.java deleted file mode 100644 index 04fdda11a577..000000000000 --- 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.CodeContainerInner; - -/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ -public interface CodeContainersClient { - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/CodeVersionsClient.java deleted file mode 100644 index fa5b5e3a4469..000000000000 --- 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.CodeVersionInner; - -/** 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionInner body, - Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CodeVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body); -} 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 0f44fde086c8..000000000000 --- 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.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in ComponentContainersClient. */ -public interface ComponentContainersClient { - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ComponentVersionsClient.java deleted file mode 100644 index c1374059eaa0..000000000000 --- 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.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in ComponentVersionsClient. */ -public interface ComponentVersionsClient { - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionInner body, - Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComponentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body); -} 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 5676a642b170..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters); - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters); - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeResourceInner update( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void restart(String resourceGroupName, String workspaceName, String computeName, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataContainersClient.java deleted file mode 100644 index ac1a5e333193..000000000000 --- 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.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in DataContainersClient. */ -public interface DataContainersClient { - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DataVersionsClient.java deleted file mode 100644 index bf43827ba11f..000000000000 --- 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.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in DataVersionsClient. */ -public interface DataVersionsClient { - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseInner body, - Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataVersionBaseInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body); -} 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 ca474d283aa2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/DatastoresClient.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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import java.util.List; - -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ -public interface DatastoresClient { - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - DatastoreInner body, - Boolean skipValidation, - Context context); - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreInner createOrUpdate(String resourceGroupName, String workspaceName, String name, DatastoreInner body); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.java deleted file mode 100644 index 1719267cb0ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentContainersClient.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.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in EnvironmentContainersClient. */ -public interface EnvironmentContainersClient { - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/EnvironmentVersionsClient.java deleted file mode 100644 index 9b6667f2237e..000000000000 --- 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.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in EnvironmentVersionsClient. */ -public interface EnvironmentVersionsClient { - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionInner body, - Context context); - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body); -} 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 c4660d91fa81..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/JobsClient.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public interface JobsClient { - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of JobBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner get(String resourceGroupName, String workspaceName, String id); - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context); - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginCancel( - String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void cancel(String resourceGroupName, String workspaceName, String id, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelContainersClient.java deleted file mode 100644 index 980ec45c56a3..000000000000 --- 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.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in ModelContainersClient. */ -public interface ModelContainersClient { - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context); - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/ModelVersionsClient.java deleted file mode 100644 index 92582d819da1..000000000000 --- 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.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -/** An instance of this class provides access to all the operations defined in ModelVersionsClient. */ -public interface ModelVersionsClient { - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String name); - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionInner body, - Context context); - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ModelVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body); -} 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 8b20629178a8..000000000000 --- 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.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; - -/** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ -public interface OnlineDeploymentsClient { - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body); - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body); - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DeploymentLogsInner getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java deleted file mode 100644 index 8b04958fc924..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/OnlineEndpointsClient.java +++ /dev/null @@ -1,434 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ -public interface OnlineEndpointsClient { - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body); - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body); - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); - - /** - * Retrieve a valid 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); - - /** - * 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); -} 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 cf8b8217b303..000000000000 --- 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 2b613c7f88e3..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context); - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/PrivateLinkResourcesClient.java deleted file mode 100644 index 1dc6edf69f64..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/QuotasClient.java deleted file mode 100644 index f7d696e1bf38..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java deleted file mode 100644 index ad9f8256ddee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/SchedulesClient.java +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; - -/** An instance of this class provides access to all the operations defined in SchedulesClient. */ -public interface SchedulesClient { - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner get(String resourceGroupName, String workspaceName, String name); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate(String resourceGroupName, String workspaceName, String name, ScheduleInner body); - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/UsagesClient.java deleted file mode 100644 index e51b16de1b3d..000000000000 --- 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 15b40d65457f..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String location, Context context); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - VirtualMachineSizeListResultInner list(String location); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.java deleted file mode 100644 index 442aaf6a5480..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspaceConnectionsClient.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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; - -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ -public interface WorkspaceConnectionsClient { - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context); - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner create( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceConnectionPropertiesV2BasicResourceInner get( - String resourceGroupName, String workspaceName, String connectionName); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); -} 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 9c67243899ab..000000000000 --- 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 2057cda2ab5a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/WorkspacesClient.java +++ /dev/null @@ -1,594 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public interface WorkspacesClient { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters); - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName, Context context); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java deleted file mode 100644 index a21e00f4df18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlOperationInner.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of AmlOperationInner class. */ - public AmlOperationInner() { - } - - /** - * 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 a089fbd59b95..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/AmlUserFeatureInner.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.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; - - /** Creates an instance of AmlUserFeatureInner class. */ - public AmlUserFeatureInner() { - } - - /** - * Get the id property: Specifies the feature ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the feature ID. - * - * @param id the id value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the displayName property: Specifies the feature name. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Specifies the feature name. - * - * @param displayName the displayName value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the description property: Describes the feature for user experience. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Describes the feature for user experience. - * - * @param description the description value to set. - * @return the AmlUserFeatureInner object itself. - */ - public AmlUserFeatureInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.java deleted file mode 100644 index 3ec008adca64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchDeploymentInner.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.BatchDeploymentProperties; -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 BatchDeployment model. */ -@Fluent -public final class BatchDeploymentInner 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 BatchDeploymentProperties 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; - - /** Creates an instance of BatchDeploymentInner class. */ - public BatchDeploymentInner() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchDeploymentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withProperties(BatchDeploymentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the BatchDeploymentInner object itself. - */ - public BatchDeploymentInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model BatchDeploymentInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.java deleted file mode 100644 index 487307ea149b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/BatchEndpointInner.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.BatchEndpointProperties; -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 BatchEndpoint model. */ -@Fluent -public final class BatchEndpointInner 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 BatchEndpointProperties 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; - - /** Creates an instance of BatchEndpointInner class. */ - public BatchEndpointInner() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public BatchEndpointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withProperties(BatchEndpointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the BatchEndpointInner object itself. - */ - public BatchEndpointInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model BatchEndpointInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointInner.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 4abc0bf1e9e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ClusterUpdateProperties.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.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; - - /** Creates an instance of ClusterUpdateProperties class. */ - public ClusterUpdateProperties() { - } - - /** - * Get the properties property: Properties of ClusterUpdate. - * - * @return the properties value. - */ - public ScaleSettingsInformation properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ClusterUpdate. - * - * @param properties the properties value to set. - * @return the ClusterUpdateProperties object itself. - */ - public ClusterUpdateProperties withProperties(ScaleSettingsInformation properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.java deleted file mode 100644 index 627c39dd4d84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeContainerInner.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.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.CodeContainerProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class CodeContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private CodeContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of CodeContainerInner class. */ - public CodeContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeContainerInner object itself. - */ - public CodeContainerInner withProperties(CodeContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 CodeContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeContainerInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.java deleted file mode 100644 index ec872c6209d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/CodeVersionInner.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.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.CodeVersionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class CodeVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private CodeVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of CodeVersionInner class. */ - public CodeVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public CodeVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the CodeVersionInner object itself. - */ - public CodeVersionInner withProperties(CodeVersionProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 CodeVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CodeVersionInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.java deleted file mode 100644 index cfcf51505906..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentContainerInner.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.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.ComponentContainerProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ComponentContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ComponentContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ComponentContainerInner class. */ - public ComponentContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentContainerInner object itself. - */ - public ComponentContainerInner withProperties(ComponentContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 ComponentContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainerInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.java deleted file mode 100644 index 55676a9cd644..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComponentVersionInner.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.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.ComponentVersionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ComponentVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ComponentVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ComponentVersionInner class. */ - public ComponentVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ComponentVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ComponentVersionInner object itself. - */ - public ComponentVersionInner withProperties(ComponentVersionProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 ComponentVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ComponentVersionInner.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 170e868b87e9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeResourceInner.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of ComputeResourceInner class. */ - public ComputeResourceInner() { - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceInner object itself. - */ - public ComputeResourceInner withProperties(Compute properties) { - this.properties = properties; - return this; - } - - /** - * 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 ad8ddc04d37d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ComputeSecretsInner.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.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 { - /** Creates an instance of ComputeSecretsInner class. */ - public 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/DataContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.java deleted file mode 100644 index 71116c0b5ad2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataContainerInner.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.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.DataContainerProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DataContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DataContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of DataContainerInner class. */ - public DataContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataContainerInner object itself. - */ - public DataContainerInner withProperties(DataContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 DataContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.java deleted file mode 100644 index 449696898726..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DataVersionBaseInner.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.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.DataVersionBaseProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DataVersionBaseInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DataVersionBaseProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of DataVersionBaseInner class. */ - public DataVersionBaseInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DataVersionBaseProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DataVersionBaseInner object itself. - */ - public DataVersionBaseInner withProperties(DataVersionBaseProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 DataVersionBaseInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.java deleted file mode 100644 index d462f55031fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DatastoreInner.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.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.DatastoreProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class DatastoreInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private DatastoreProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of DatastoreInner class. */ - public DatastoreInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public DatastoreProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the DatastoreInner object itself. - */ - public DatastoreInner withProperties(DatastoreProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 DatastoreInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreInner.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 2cb1bcd99147..000000000000 --- 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.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 = "Sas", value = SasDatastoreSecrets.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreSecrets.class) -}) -@Immutable -public class DatastoreSecretsInner { - /** Creates an instance of DatastoreSecretsInner class. */ - public 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 d9e251314114..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DeploymentLogsInner.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.fasterxml.jackson.annotation.JsonProperty; - -/** The DeploymentLogs model. */ -@Fluent -public final class DeploymentLogsInner { - /* - * The retrieved online deployment logs. - */ - @JsonProperty(value = "content") - private String content; - - /** Creates an instance of DeploymentLogsInner class. */ - public DeploymentLogsInner() { - } - - /** - * Get the content property: The retrieved online deployment logs. - * - * @return the content value. - */ - public String content() { - return this.content; - } - - /** - * Set the content property: The retrieved online deployment logs. - * - * @param content the content value to set. - * @return the DeploymentLogsInner object itself. - */ - public DeploymentLogsInner withContent(String content) { - this.content = content; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 0294a92441bb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/DiagnoseResponseResultInner.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.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; - - /** Creates an instance of DiagnoseResponseResultInner class. */ - public DiagnoseResponseResultInner() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public DiagnoseResponseResultValue value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the DiagnoseResponseResultInner object itself. - */ - public DiagnoseResponseResultInner withValue(DiagnoseResponseResultValue value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } -} 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 cd26c1312628..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthKeysInner.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.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; - - /** Creates an instance of EndpointAuthKeysInner class. */ - public EndpointAuthKeysInner() { - } - - /** - * Get the primaryKey property: The primary key. - * - * @return the primaryKey value. - */ - public String primaryKey() { - return this.primaryKey; - } - - /** - * Set the primaryKey property: The primary key. - * - * @param primaryKey the primaryKey value to set. - * @return the EndpointAuthKeysInner object itself. - */ - public EndpointAuthKeysInner withPrimaryKey(String primaryKey) { - this.primaryKey = primaryKey; - return this; - } - - /** - * Get the secondaryKey property: The secondary key. - * - * @return the secondaryKey value. - */ - public String secondaryKey() { - return this.secondaryKey; - } - - /** - * Set the secondaryKey property: The secondary key. - * - * @param secondaryKey the secondaryKey value to set. - * @return the EndpointAuthKeysInner object itself. - */ - public EndpointAuthKeysInner withSecondaryKey(String secondaryKey) { - this.secondaryKey = secondaryKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f0a288636a6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointAuthTokenInner.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.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; - - /** Creates an instance of EndpointAuthTokenInner class. */ - public EndpointAuthTokenInner() { - } - - /** - * Get the accessToken property: Access token for endpoint authentication. - * - * @return the accessToken value. - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Set the accessToken property: Access token for endpoint authentication. - * - * @param accessToken the accessToken value to set. - * @return the EndpointAuthTokenInner object itself. - */ - public EndpointAuthTokenInner withAccessToken(String accessToken) { - this.accessToken = accessToken; - return this; - } - - /** - * Get the 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 6219e1e61a6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EndpointPropertiesBaseInner.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.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; - - /** Creates an instance of EndpointPropertiesBaseInner class. */ - public EndpointPropertiesBaseInner() { - } - - /** - * 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/EnvironmentContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.java deleted file mode 100644 index a6d47c5fe1aa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentContainerInner.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.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.EnvironmentContainerProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class EnvironmentContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private EnvironmentContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of EnvironmentContainerInner class. */ - public EnvironmentContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentContainerInner object itself. - */ - public EnvironmentContainerInner withProperties(EnvironmentContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 EnvironmentContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainerInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.java deleted file mode 100644 index ce8d1971fc7a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/EnvironmentVersionInner.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.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.EnvironmentVersionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class EnvironmentVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private EnvironmentVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of EnvironmentVersionInner class. */ - public EnvironmentVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public EnvironmentVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the EnvironmentVersionInner object itself. - */ - public EnvironmentVersionInner withProperties(EnvironmentVersionProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 EnvironmentVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionInner.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 8dbef74cad4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ExternalFqdnResponseInner.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.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; - - /** Creates an instance of ExternalFqdnResponseInner class. */ - public ExternalFqdnResponseInner() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ExternalFqdnResponseInner object itself. - */ - public ExternalFqdnResponseInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.java deleted file mode 100644 index 031843b71332..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/JobBaseInner.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.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.JobBaseProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class JobBaseInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private JobBaseProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of JobBaseInner class. */ - public JobBaseInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public JobBaseProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the JobBaseInner object itself. - */ - public JobBaseInner withProperties(JobBaseProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 JobBaseInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobBaseInner.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 7750f1375b4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListNotebookKeysResultInner.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.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; - - /** Creates an instance of ListNotebookKeysResultInner class. */ - public ListNotebookKeysResultInner() { - } - - /** - * Get the primaryAccessKey property: The primaryAccessKey property. - * - * @return the primaryAccessKey value. - */ - public String primaryAccessKey() { - return this.primaryAccessKey; - } - - /** - * Get the secondaryAccessKey property: The secondaryAccessKey property. - * - * @return the secondaryAccessKey value. - */ - public String secondaryAccessKey() { - return this.secondaryAccessKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f4fd116ddf38..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListStorageAccountKeysResultInner.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.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; - - /** Creates an instance of ListStorageAccountKeysResultInner class. */ - public ListStorageAccountKeysResultInner() { - } - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 7e18cd1ee62e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ListWorkspaceKeysResultInner.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of ListWorkspaceKeysResultInner class. */ - public ListWorkspaceKeysResultInner() { - } - - /** - * Get the userStorageKey property: The userStorageKey property. - * - * @return the userStorageKey value. - */ - public String userStorageKey() { - return this.userStorageKey; - } - - /** - * Get the userStorageResourceId property: The userStorageResourceId property. - * - * @return the userStorageResourceId value. - */ - public String userStorageResourceId() { - return this.userStorageResourceId; - } - - /** - * Get the appInsightsInstrumentationKey property: The appInsightsInstrumentationKey property. - * - * @return the appInsightsInstrumentationKey value. - */ - public String appInsightsInstrumentationKey() { - return this.appInsightsInstrumentationKey; - } - - /** - * Get the containerRegistryCredentials property: The containerRegistryCredentials property. - * - * @return the containerRegistryCredentials value. - */ - public RegistryListCredentialsResult containerRegistryCredentials() { - return this.containerRegistryCredentials; - } - - /** - * Get the notebookAccessKeys property: The notebookAccessKeys property. - * - * @return the notebookAccessKeys value. - */ - public ListNotebookKeysResultInner notebookAccessKeys() { - return this.notebookAccessKeys; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerRegistryCredentials() != null) { - containerRegistryCredentials().validate(); - } - if (notebookAccessKeys() != null) { - notebookAccessKeys().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.java deleted file mode 100644 index 59b94aaaf36e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelContainerInner.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.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.ModelContainerProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ModelContainerInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ModelContainerProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ModelContainerInner class. */ - public ModelContainerInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelContainerProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelContainerInner object itself. - */ - public ModelContainerInner withProperties(ModelContainerProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 ModelContainerInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelContainerInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.java deleted file mode 100644 index 8d5e0c69f79d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ModelVersionInner.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.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.ModelVersionProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ModelVersionInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ModelVersionProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ModelVersionInner class. */ - public ModelVersionInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ModelVersionProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ModelVersionInner object itself. - */ - public ModelVersionInner withProperties(ModelVersionProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 ModelVersionInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionInner.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 6fb3125ba240..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookAccessTokenResultInner.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.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; - - /** Creates an instance of NotebookAccessTokenResultInner class. */ - public NotebookAccessTokenResultInner() { - } - - /** - * Get the notebookResourceId property: The notebookResourceId property. - * - * @return the notebookResourceId value. - */ - public String notebookResourceId() { - return this.notebookResourceId; - } - - /** - * Get the hostname property: The hostName property. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the publicDns property: The publicDns property. - * - * @return the publicDns value. - */ - public String publicDns() { - return this.publicDns; - } - - /** - * Get the accessToken property: The accessToken property. - * - * @return the accessToken value. - */ - public String accessToken() { - return this.accessToken; - } - - /** - * Get the tokenType property: The tokenType property. - * - * @return the tokenType value. - */ - public String tokenType() { - return this.tokenType; - } - - /** - * Get the expiresIn property: The expiresIn property. - * - * @return the expiresIn value. - */ - public Integer expiresIn() { - return this.expiresIn; - } - - /** - * Get the refreshToken property: The refreshToken property. - * - * @return the refreshToken value. - */ - public String refreshToken() { - return this.refreshToken; - } - - /** - * Get the scope property: The scope property. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 943388668017..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/NotebookResourceInfoInner.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of NotebookResourceInfoInner class. */ - public NotebookResourceInfoInner() { - } - - /** - * Get the fqdn property: The fqdn property. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Set the fqdn property: The fqdn property. - * - * @param fqdn the fqdn value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withFqdn(String fqdn) { - this.fqdn = fqdn; - return this; - } - - /** - * Get the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: the data plane resourceId that used to initialize notebook component. - * - * @param resourceId the resourceId value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @return the notebookPreparationError value. - */ - public NotebookPreparationError notebookPreparationError() { - return this.notebookPreparationError; - } - - /** - * Set the notebookPreparationError property: The error that occurs when preparing notebook. - * - * @param notebookPreparationError the notebookPreparationError value to set. - * @return the NotebookResourceInfoInner object itself. - */ - public NotebookResourceInfoInner withNotebookPreparationError(NotebookPreparationError notebookPreparationError) { - this.notebookPreparationError = notebookPreparationError; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (notebookPreparationError() != null) { - notebookPreparationError().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java deleted file mode 100644 index d48288f3c447..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineDeploymentInner.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The OnlineDeployment model. */ -@Fluent -public final class OnlineDeploymentInner 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 OnlineDeploymentProperties 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; - - /** Creates an instance of OnlineDeploymentInner class. */ - public OnlineDeploymentInner() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineDeploymentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withProperties(OnlineDeploymentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the OnlineDeploymentInner object itself. - */ - public OnlineDeploymentInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property properties in model OnlineDeploymentInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentInner.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.java deleted file mode 100644 index 0f940fd5bb9f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/OnlineEndpointInner.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.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The OnlineEndpoint model. */ -@Fluent -public final class OnlineEndpointInner 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 OnlineEndpointProperties 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; - - /** Creates an instance of OnlineEndpointInner class. */ - public OnlineEndpointInner() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Metadata used by portal/tooling/etc to render different UX experiences for resources of - * the same type. - * - * @param kind the kind value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public OnlineEndpointProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withProperties(OnlineEndpointProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the OnlineEndpointInner object itself. - */ - public OnlineEndpointInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (properties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property properties in model OnlineEndpointInner")); - } else { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointInner.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 ac7de011781b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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; - - /** Creates an instance of PrivateEndpointConnectionInner class. */ - public PrivateEndpointConnectionInner() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateEndpointConnectionInner object itself. - */ - public PrivateEndpointConnectionInner withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the 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 c09c5305622f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateEndpointConnectionProperties.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.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; - - /** Creates an instance of PrivateEndpointConnectionProperties class. */ - public PrivateEndpointConnectionProperties() { - } - - /** - * Get the privateEndpoint property: The resource of private end point. - * - * @return the privateEndpoint value. - */ - public PrivateEndpoint privateEndpoint() { - return this.privateEndpoint; - } - - /** - * Set the privateEndpoint property: The resource of private end point. - * - * @param privateEndpoint the privateEndpoint value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - this.privateEndpoint = privateEndpoint; - return this; - } - - /** - * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @return the privateLinkServiceConnectionState value. - */ - public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.privateLinkServiceConnectionState; - } - - /** - * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection - * between service consumer and provider. - * - * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. - * @return the PrivateEndpointConnectionProperties object itself. - */ - public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( - PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; - return this; - } - - /** - * Get the provisioningState property: The provisioning state of the private endpoint connection resource. - * - * @return the provisioningState value. - */ - public PrivateEndpointConnectionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpoint() != null) { - privateEndpoint().validate(); - } - if (privateLinkServiceConnectionState() == null) { - throw LOGGER - .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 6047466b9230..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceListResultInner.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.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; - - /** Creates an instance of PrivateLinkResourceListResultInner class. */ - public PrivateLinkResourceListResultInner() { - } - - /** - * Get the value property: Array of private link resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private link resources. - * - * @param value the value value to set. - * @return the PrivateLinkResourceListResultInner object itself. - */ - public PrivateLinkResourceListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 7547a19c2fa6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of PrivateLinkResourceProperties class. */ - public PrivateLinkResourceProperties() { - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Get the requiredMembers property: The private link resource required member names. - * - * @return the requiredMembers value. - */ - public List requiredMembers() { - return this.requiredMembers; - } - - /** - * Get the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @return the requiredZoneNames value. - */ - public List requiredZoneNames() { - return this.requiredZoneNames; - } - - /** - * Set the requiredZoneNames property: The private link resource Private link DNS zone name. - * - * @param requiredZoneNames the requiredZoneNames value to set. - * @return the PrivateLinkResourceProperties object itself. - */ - public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { - this.requiredZoneNames = requiredZoneNames; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 66cc69207895..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ResourceQuotaInner.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of ResourceQuotaInner class. */ - public ResourceQuotaInner() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the name property: Name of the resource. - * - * @return the name value. - */ - public ResourceName name() { - return this.name; - } - - /** - * Get the limit property: 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/ScheduleInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.java deleted file mode 100644 index 4efea46f4816..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/ScheduleInner.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.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.ScheduleProperties; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Azure Resource Manager resource envelope. */ -@Fluent -public final class ScheduleInner extends ProxyResource { - /* - * [Required] Additional attributes of the entity. - */ - @JsonProperty(value = "properties", required = true) - private ScheduleProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of ScheduleInner class. */ - public ScheduleInner() { - } - - /** - * Get the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - public ScheduleProperties properties() { - return this.properties; - } - - /** - * Set the properties property: [Required] Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the ScheduleInner object itself. - */ - public ScheduleInner withProperties(ScheduleProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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 ScheduleInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleInner.class); -} 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 958d5005f9a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SharedPrivateLinkResourceProperty.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of SharedPrivateLinkResourceProperty class. */ - public SharedPrivateLinkResourceProperty() { - } - - /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.privateLinkResourceId; - } - - /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withPrivateLinkResourceId(String privateLinkResourceId) { - this.privateLinkResourceId = privateLinkResourceId; - return this; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.groupId; - } - - /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withGroupId(String groupId) { - this.groupId = groupId; - return this; - } - - /** - * Get the requestMessage property: Request message. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.requestMessage; - } - - /** - * Set the requestMessage property: Request message. - * - * @param requestMessage the requestMessage value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withRequestMessage(String requestMessage) { - this.requestMessage = requestMessage; - return this; - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the SharedPrivateLinkResourceProperty object itself. - */ - public SharedPrivateLinkResourceProperty withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 7eeb0fa29679..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/SkuResourceInner.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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; - - /** Creates an instance of SkuResourceInner class. */ - public SkuResourceInner() { - } - - /** - * 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 dbbad12998c9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UpdateWorkspaceQuotasResultInner.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.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; - - /** Creates an instance of UpdateWorkspaceQuotasResultInner class. */ - public UpdateWorkspaceQuotasResultInner() { - } - - /** - * Get the value property: The list of workspace quota update result. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota update result. Call ListNext() with - * this to fetch the next page of Workspace Quota update result. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 e4fe73205963..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/UsageInner.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.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; - - /** Creates an instance of UsageInner class. */ - public UsageInner() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - public String amlWorkspaceLocation() { - return this.amlWorkspaceLocation; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - public UsageUnit unit() { - return this.unit; - } - - /** - * Get the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - public Long currentValue() { - return this.currentValue; - } - - /** - * Get the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - public Long limit() { - return this.limit; - } - - /** - * Get the name property: The name of the type of usage. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() != null) { - name().validate(); - } - } -} 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 1b6d96583c16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/VirtualMachineSizeListResultInner.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.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; - - /** Creates an instance of VirtualMachineSizeListResultInner class. */ - public VirtualMachineSizeListResultInner() { - } - - /** - * Get the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of virtual machine sizes supported by AmlCompute. - * - * @param value the value value to set. - * @return the VirtualMachineSizeListResultInner object itself. - */ - public VirtualMachineSizeListResultInner withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java deleted file mode 100644 index 640d838868b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceConnectionPropertiesV2BasicResourceInner.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.fluent.models; - -import com.azure.core.annotation.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.WorkspaceConnectionPropertiesV2; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The WorkspaceConnectionPropertiesV2BasicResource model. */ -@Fluent -public final class WorkspaceConnectionPropertiesV2BasicResourceInner extends ProxyResource { - /* - * The properties property. - */ - @JsonProperty(value = "properties", required = true) - private WorkspaceConnectionPropertiesV2 properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; - - /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceInner class. */ - public WorkspaceConnectionPropertiesV2BasicResourceInner() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public WorkspaceConnectionPropertiesV2 properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the WorkspaceConnectionPropertiesV2BasicResourceInner object itself. - */ - public WorkspaceConnectionPropertiesV2BasicResourceInner withProperties( - WorkspaceConnectionPropertiesV2 properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * 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" - + " WorkspaceConnectionPropertiesV2BasicResourceInner")); - } else { - properties().validate(); - } - } - - private static final ClientLogger LOGGER = - new ClientLogger(WorkspaceConnectionPropertiesV2BasicResourceInner.class); -} 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 0574f791c1fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspaceInner.java +++ /dev/null @@ -1,648 +0,0 @@ -// Copyright (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; - - /** Creates an instance of WorkspaceInner class. */ - public WorkspaceInner() { - } - - /** - * Get the innerProperties property: The properties of the machine learning workspace. - * - * @return the innerProperties value. - */ - private WorkspacePropertiesInner innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the 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(); - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.innerProperties() == null ? null : this.innerProperties().v1LegacyMode(); - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspaceInner object itself. - */ - public WorkspaceInner withV1LegacyMode(Boolean v1LegacyMode) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePropertiesInner(); - } - this.innerProperties().withV1LegacyMode(v1LegacyMode); - return this; - } - - /** - * 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 147434b8ed51..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesInner.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.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; - - /* - * Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - */ - @JsonProperty(value = "v1LegacyMode") - private Boolean v1LegacyMode; - - /** Creates an instance of WorkspacePropertiesInner class. */ - public WorkspacePropertiesInner() { - } - - /** - * Get the workspaceId property: The immutable id associated with this workspace. - * - * @return the workspaceId value. - */ - public String workspaceId() { - return this.workspaceId; - } - - /** - * Get the description property: The description of this workspace. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of this workspace. - * - * @param description the description value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @return the friendlyName value. - */ - public String friendlyName() { - return this.friendlyName; - } - - /** - * Set the friendlyName property: The friendly name for this workspace. This name in mutable. - * - * @param friendlyName the friendlyName value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withFriendlyName(String friendlyName) { - this.friendlyName = friendlyName; - return this; - } - - /** - * Get the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @return the keyVault value. - */ - public String keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault property: ARM id of the key vault associated with this workspace. This cannot be changed once - * the workspace has been created. - * - * @param keyVault the keyVault value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withKeyVault(String keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @return the applicationInsights value. - */ - public String applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: ARM id of the application insights associated with this workspace. - * - * @param applicationInsights the applicationInsights value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withApplicationInsights(String applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @return the containerRegistry value. - */ - public String containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: ARM id of the container registry associated with this workspace. - * - * @param containerRegistry the containerRegistry value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withContainerRegistry(String containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @return the storageAccount value. - */ - public String storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: ARM id of the storage account associated with this workspace. This cannot be - * changed once the workspace has been created. - * - * @param storageAccount the storageAccount value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withStorageAccount(String storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @return the discoveryUrl value. - */ - public String discoveryUrl() { - return this.discoveryUrl; - } - - /** - * Set the discoveryUrl property: Url for the discovery service to identify regional endpoints for machine learning - * experimentation services. - * - * @param discoveryUrl the discoveryUrl value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withDiscoveryUrl(String discoveryUrl) { - this.discoveryUrl = discoveryUrl; - return this; - } - - /** - * Get the provisioningState property: The current deployment state of workspace resource. The provisioningState is - * to indicate states for resource provisioning. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the encryption property: The encryption settings of Azure ML workspace. - * - * @return the encryption value. - */ - public EncryptionProperty encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption settings of Azure ML workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withEncryption(EncryptionProperty encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @return the hbiWorkspace value. - */ - public Boolean hbiWorkspace() { - return this.hbiWorkspace; - } - - /** - * Set the hbiWorkspace property: The flag to signal HBI data in the workspace and reduce diagnostic data collected - * by the service. - * - * @param hbiWorkspace the hbiWorkspace value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withHbiWorkspace(Boolean hbiWorkspace) { - this.hbiWorkspace = hbiWorkspace; - return this; - } - - /** - * Get the serviceProvisionedResourceGroup property: The name of the managed resource group created by workspace RP - * in customer subscription if the workspace is CMK workspace. - * - * @return the serviceProvisionedResourceGroup value. - */ - public String serviceProvisionedResourceGroup() { - return this.serviceProvisionedResourceGroup; - } - - /** - * Get the privateLinkCount property: Count of private connections in the workspace. - * - * @return the privateLinkCount value. - */ - public Integer privateLinkCount() { - return this.privateLinkCount; - } - - /** - * Get the imageBuildCompute property: The compute name for image build. - * - * @return the imageBuildCompute value. - */ - public String imageBuildCompute() { - return this.imageBuildCompute; - } - - /** - * Set the imageBuildCompute property: The compute name for image build. - * - * @param imageBuildCompute the imageBuildCompute value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withImageBuildCompute(String imageBuildCompute) { - this.imageBuildCompute = imageBuildCompute; - return this; - } - - /** - * Get the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @return the allowPublicAccessWhenBehindVnet value. - */ - public Boolean allowPublicAccessWhenBehindVnet() { - return this.allowPublicAccessWhenBehindVnet; - } - - /** - * Set the allowPublicAccessWhenBehindVnet property: The flag to indicate whether to allow public access when behind - * VNet. - * - * @param allowPublicAccessWhenBehindVnet the allowPublicAccessWhenBehindVnet value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withAllowPublicAccessWhenBehindVnet(Boolean allowPublicAccessWhenBehindVnet) { - this.allowPublicAccessWhenBehindVnet = allowPublicAccessWhenBehindVnet; - return this; - } - - /** - * Get the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Whether requests from Public Network are allowed. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the privateEndpointConnections property: The list of private endpoint connections in the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Get the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @return the sharedPrivateLinkResources value. - */ - public List sharedPrivateLinkResources() { - return this.sharedPrivateLinkResources; - } - - /** - * Set the sharedPrivateLinkResources property: The list of shared private link resources in this workspace. - * - * @param sharedPrivateLinkResources the sharedPrivateLinkResources value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withSharedPrivateLinkResources( - List sharedPrivateLinkResources) { - this.sharedPrivateLinkResources = sharedPrivateLinkResources; - return this; - } - - /** - * Get the notebookInfo property: The notebook info of Azure ML workspace. - * - * @return the notebookInfo value. - */ - public NotebookResourceInfoInner notebookInfo() { - return this.notebookInfo; - } - - /** - * Get the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @return the serviceManagedResourcesSettings value. - */ - public ServiceManagedResourcesSettings serviceManagedResourcesSettings() { - return this.serviceManagedResourcesSettings; - } - - /** - * Set the serviceManagedResourcesSettings property: The service managed resource settings. - * - * @param serviceManagedResourcesSettings the serviceManagedResourcesSettings value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withServiceManagedResourcesSettings( - ServiceManagedResourcesSettings serviceManagedResourcesSettings) { - this.serviceManagedResourcesSettings = serviceManagedResourcesSettings; - return this; - } - - /** - * Get the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @return the primaryUserAssignedIdentity value. - */ - public String primaryUserAssignedIdentity() { - return this.primaryUserAssignedIdentity; - } - - /** - * Set the primaryUserAssignedIdentity property: The user assigned identity resource id that represents the - * workspace identity. - * - * @param primaryUserAssignedIdentity the primaryUserAssignedIdentity value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withPrimaryUserAssignedIdentity(String primaryUserAssignedIdentity) { - this.primaryUserAssignedIdentity = primaryUserAssignedIdentity; - return this; - } - - /** - * Get the tenantId property: The tenant id associated with this workspace. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Get the storageHnsEnabled property: If the storage associated with the workspace has hierarchical namespace(HNS) - * enabled. - * - * @return the storageHnsEnabled value. - */ - public Boolean storageHnsEnabled() { - return this.storageHnsEnabled; - } - - /** - * Get the mlFlowTrackingUri property: The URI associated with this workspace that machine learning flow must point - * at to set up tracking. - * - * @return the mlFlowTrackingUri value. - */ - public String mlFlowTrackingUri() { - return this.mlFlowTrackingUri; - } - - /** - * Get the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - public Boolean v1LegacyMode() { - return this.v1LegacyMode; - } - - /** - * Set the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @param v1LegacyMode the v1LegacyMode value to set. - * @return the WorkspacePropertiesInner object itself. - */ - public WorkspacePropertiesInner withV1LegacyMode(Boolean v1LegacyMode) { - this.v1LegacyMode = v1LegacyMode; - return this; - } - - /** - * 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 ecf35a74ba33..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/WorkspacePropertiesUpdateParameters.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of WorkspacePropertiesUpdateParameters class. */ - public WorkspacePropertiesUpdateParameters() { - } - - /** - * 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 3e822d30cd96..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.fluent.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java deleted file mode 100644 index f5bef4622975..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/fluent/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.fluent; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AmlOperationImpl.java deleted file mode 100644 index 803be140a597..000000000000 --- 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 3430c2ef2701..000000000000 --- 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 018c1d288b6a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesBuilder.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.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** A builder for creating a new instance of the AzureMachineLearningWorkspacesImpl type. */ -@ServiceClientBuilder(serviceClients = {AzureMachineLearningWorkspacesImpl.class}) -public final class AzureMachineLearningWorkspacesBuilder { - /* - * The ID of the target subscription. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. - * - * @param subscriptionId the subscriptionId value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AzureMachineLearningWorkspacesBuilder. - */ - public AzureMachineLearningWorkspacesBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of AzureMachineLearningWorkspacesImpl with the provided parameters. - * - * @return an instance of AzureMachineLearningWorkspacesImpl. - */ - public AzureMachineLearningWorkspacesImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureMachineLearningWorkspacesImpl client = - new AzureMachineLearningWorkspacesImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - subscriptionId, - localEndpoint); - return client; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java deleted file mode 100644 index 242efe7553fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/AzureMachineLearningWorkspacesImpl.java +++ /dev/null @@ -1,654 +0,0 @@ -// Copyright (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.SchedulesClient; -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 SchedulesClient object to access its operations. */ - private final SchedulesClient schedules; - - /** - * Gets the SchedulesClient object to access its operations. - * - * @return the SchedulesClient object. - */ - public SchedulesClient getSchedules() { - return this.schedules; - } - - /** The 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-10-01"; - this.operations = new OperationsClientImpl(this); - this.workspaces = new WorkspacesClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.virtualMachineSizes = new VirtualMachineSizesClientImpl(this); - this.quotas = new QuotasClientImpl(this); - this.computes = new ComputesClientImpl(this); - this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); - this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); - this.workspaceConnections = new WorkspaceConnectionsClientImpl(this); - this.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.schedules = new SchedulesClientImpl(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/BatchDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java deleted file mode 100644 index 379a98ca04ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentImpl.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class BatchDeploymentImpl implements BatchDeployment, BatchDeployment.Definition, BatchDeployment.Update { - private BatchDeploymentInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public BatchDeploymentProperties 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 BatchDeploymentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private String deploymentName; - - private PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties updateBody; - - public BatchDeploymentImpl withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public BatchDeployment create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); - return this; - } - - public BatchDeployment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - BatchDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchDeploymentInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public BatchDeploymentImpl update() { - this.updateBody = new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties(); - return this; - } - - public BatchDeployment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public BatchDeployment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - BatchDeploymentImpl( - BatchDeploymentInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 BatchDeployment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public BatchDeployment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public BatchDeploymentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchDeploymentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchDeploymentImpl withProperties(BatchDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchDeploymentImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public BatchDeploymentImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchDeploymentImpl withProperties(PartialBatchDeployment properties) { - this.updateBody.withProperties(properties); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsClientImpl.java deleted file mode 100644 index 6f28d675f5f5..000000000000 --- 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.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BatchDeploymentsClient. */ -public final class BatchDeploymentsClientImpl implements BatchDeploymentsClient { - /** The proxy service used to perform REST calls. */ - private final BatchDeploymentsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of BatchDeploymentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BatchDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(BatchDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchDeployments to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface BatchDeploymentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchDeploymentInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - orderBy, - top, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - orderBy, - top, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); - } - - /** - * Lists Batch inference deployments in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); - } - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName Inference deployment identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentInner.class, - BatchDeploymentInner.class, - this.client.getContext()); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Update a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchDeploymentInner.class, - BatchDeploymentInner.class, - this.client.getContext()); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchDeploymentInner.class, BatchDeploymentInner.class, context); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Creates/updates a batch inference deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The identifier for the Batch inference deployment. - * @param body Batch inference deployment definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - BatchDeploymentInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 c1294dbb5c11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchDeploymentsImpl.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.BatchDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.BatchDeployments; - -public final class BatchDeploymentsImpl implements BatchDeployments { - private static final ClientLogger LOGGER = new ClientLogger(BatchDeploymentsImpl.class); - - private final BatchDeploymentsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public BatchDeploymentsImpl( - BatchDeploymentsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BatchDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BatchDeployment get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - BatchDeploymentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new BatchDeploymentImpl(inner, this.manager()); - } else { - return null; - } - } - - public BatchDeployment getById(String id) { - String resourceGroupName = 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 BatchDeploymentImpl define(String name) { - return new BatchDeploymentImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.java deleted file mode 100644 index 43e01217aeca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointImpl.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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class BatchEndpointImpl implements BatchEndpoint, BatchEndpoint.Definition, BatchEndpoint.Update { - private BatchEndpointInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public BatchEndpointProperties 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 BatchEndpointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialMinimalTrackedResourceWithIdentity updateBody; - - public BatchEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public BatchEndpoint create() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public BatchEndpoint create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - BatchEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new BatchEndpointInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public BatchEndpointImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); - return this; - } - - public BatchEndpoint apply() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public BatchEndpoint apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - BatchEndpointImpl( - BatchEndpointInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "batchEndpoints"); - } - - public BatchEndpoint refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public BatchEndpoint refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getBatchEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public Response listKeysWithResponse(Context context) { - return serviceManager - .batchEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthKeys listKeys() { - return serviceManager.batchEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public BatchEndpointImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BatchEndpointImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BatchEndpointImpl withProperties(BatchEndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public BatchEndpointImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public BatchEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public BatchEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public BatchEndpointImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public BatchEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java deleted file mode 100644 index 9d00fdc12171..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/BatchEndpointsClientImpl.java +++ /dev/null @@ -1,1644 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.BatchEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in BatchEndpointsClient. */ -public final class BatchEndpointsClientImpl implements BatchEndpointsClient { - /** The proxy service used to perform REST calls. */ - private final BatchEndpointsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of BatchEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BatchEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(BatchEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesBatchEndpoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface BatchEndpointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") BatchEndpointInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}" - + "/listkeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Integer count, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - count, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - count, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Integer count, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, count, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final Integer count = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip)); - } - - /** - * Lists Batch inference endpoint in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param count Number of endpoints to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of BatchEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, count, skip, context)); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointInner.class, - BatchEndpointInner.class, - this.client.getContext()); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Update a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Mutable batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - BatchEndpointInner.class, - BatchEndpointInner.class, - this.client.getContext()); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BatchEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), BatchEndpointInner.class, BatchEndpointInner.class, context); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BatchEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Creates a batch inference endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch inference endpoint. - * @param body Batch inference endpoint definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BatchEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, BatchEndpointInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 111c2006d197..000000000000 --- 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.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoints; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; - -public final class BatchEndpointsImpl implements BatchEndpoints { - private static final ClientLogger LOGGER = new ClientLogger(BatchEndpointsImpl.class); - - private final BatchEndpointsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public BatchEndpointsImpl( - BatchEndpointsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, Integer count, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, count, skip, context); - return Utils.mapPage(inner, inner1 -> new BatchEndpointImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new BatchEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - BatchEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new BatchEndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public BatchEndpoint getById(String id) { - String resourceGroupName = 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 BatchEndpointImpl define(String name) { - return new BatchEndpointImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java deleted file mode 100644 index f739c63622ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainerImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; - -public final class CodeContainerImpl implements CodeContainer, CodeContainer.Definition, CodeContainer.Update { - private CodeContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CodeContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public CodeContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public CodeContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public CodeContainerImpl update() { - return this; - } - - public CodeContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - CodeContainerImpl( - CodeContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "codes"); - } - - public CodeContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public CodeContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public CodeContainerImpl withProperties(CodeContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java deleted file mode 100644 index 019f7490ddf8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeContainersClientImpl.java +++ /dev/null @@ -1,903 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.CodeContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in CodeContainersClient. */ -public final class CodeContainersClientImpl implements CodeContainersClient { - /** The proxy service used to perform REST calls. */ - private final CodeContainersService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of CodeContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CodeContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(CodeContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesCodeContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface CodeContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeContainerInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * List containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, CodeContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 0202b27fb32c..000000000000 --- 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.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainers; - -public final class CodeContainersImpl implements CodeContainers { - private static final ClientLogger LOGGER = new ClientLogger(CodeContainersImpl.class); - - private final CodeContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public CodeContainersImpl( - CodeContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, context); - return Utils.mapPage(inner, inner1 -> new CodeContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CodeContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeContainer get(String resourceGroupName, String workspaceName, String name) { - CodeContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new CodeContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeContainer getById(String id) { - String resourceGroupName = 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 CodeContainerImpl define(String name) { - return new CodeContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.java deleted file mode 100644 index daab7505f3ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersion; -import com.azure.resourcemanager.machinelearning.models.CodeVersionProperties; - -public final class CodeVersionImpl implements CodeVersion, CodeVersion.Definition, CodeVersion.Update { - private CodeVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public CodeVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CodeVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public CodeVersionImpl withExistingCode(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public CodeVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new CodeVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public CodeVersionImpl update() { - return this; - } - - public CodeVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public CodeVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - CodeVersionImpl( - CodeVersionInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 CodeVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public CodeVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getCodeVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public CodeVersionImpl withProperties(CodeVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java deleted file mode 100644 index 5e0cdc080acd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/CodeVersionsClientImpl.java +++ /dev/null @@ -1,1014 +0,0 @@ -// Copyright (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.CodeVersionInner; -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") - public interface CodeVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CodeVersionInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - CodeVersionInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CodeVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, CodeVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of CodeVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 49705d0a8abd..000000000000 --- 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.CodeVersionInner; -import com.azure.resourcemanager.machinelearning.models.CodeVersion; -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 CodeVersionImpl(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 CodeVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CodeVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CodeVersion get(String resourceGroupName, String workspaceName, String name, String version) { - CodeVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new CodeVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public CodeVersion 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 CodeVersionImpl define(String name) { - return new CodeVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.java deleted file mode 100644 index 0208215c0403..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainerImpl.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.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; - -public final class ComponentContainerImpl - implements ComponentContainer, ComponentContainer.Definition, ComponentContainer.Update { - private ComponentContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ComponentContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ComponentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ComponentContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ComponentContainerImpl update() { - return this; - } - - public ComponentContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentContainerImpl( - ComponentContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "components"); - } - - public ComponentContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ComponentContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ComponentContainerImpl withProperties(ComponentContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java deleted file mode 100644 index 7c8593db5a97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentContainersClientImpl.java +++ /dev/null @@ -1,915 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.ComponentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComponentContainersClient. */ -public final class ComponentContainersClientImpl implements ComponentContainersClient { - /** The proxy service used to perform REST calls. */ - private final ComponentContainersService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ComponentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComponentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ComponentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesComponentContainers to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ComponentContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentContainerInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List component containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ComponentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 b9bc5f40a732..000000000000 --- 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.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class ComponentContainersImpl implements ComponentContainers { - private static final ClientLogger LOGGER = new ClientLogger(ComponentContainersImpl.class); - - private final ComponentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ComponentContainersImpl( - ComponentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComponentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentContainer get(String resourceGroupName, String workspaceName, String name) { - ComponentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ComponentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentContainer getById(String id) { - String resourceGroupName = 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 ComponentContainerImpl define(String name) { - return new ComponentContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.java deleted file mode 100644 index 2b90ee811ddb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionImpl.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.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; - -public final class ComponentVersionImpl - implements ComponentVersion, ComponentVersion.Definition, ComponentVersion.Update { - private ComponentVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ComponentVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ComponentVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public ComponentVersionImpl withExistingComponent(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ComponentVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ComponentVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ComponentVersionImpl update() { - return this; - } - - public ComponentVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ComponentVersionImpl( - ComponentVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 ComponentVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ComponentVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getComponentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public ComponentVersionImpl withProperties(ComponentVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java deleted file mode 100644 index 4cfb98d8af64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsClientImpl.java +++ /dev/null @@ -1,1042 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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.ComponentVersionInner; -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") - public interface ComponentVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComponentVersionInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); - } - - /** - * List component versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Component name. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ComponentVersionInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComponentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ComponentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ComponentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 b31d3e83102b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComponentVersionsImpl.java +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.ComponentVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersions; -import com.azure.resourcemanager.machinelearning.models.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 ComponentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ComponentVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComponentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ComponentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ComponentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ComponentVersion 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 ComponentVersionImpl define(String name) { - return new ComponentVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeResourceImpl.java deleted file mode 100644 index 26ad7807900d..000000000000 --- 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 Response listKeysWithResponse(Context context) { - return serviceManager.computes().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeSecrets listKeys() { - return serviceManager.computes().listKeys(resourceGroupName, workspaceName, computeName); - } - - public void start() { - serviceManager.computes().start(resourceGroupName, workspaceName, computeName); - } - - public void start(Context context) { - serviceManager.computes().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop() { - serviceManager.computes().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(Context context) { - serviceManager.computes().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart() { - serviceManager.computes().restart(resourceGroupName, workspaceName, computeName); - } - - public void restart(Context context) { - serviceManager.computes().restart(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ComputeResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ComputeResourceImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ComputeResourceImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ComputeResourceImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public ComputeResourceImpl withProperties(Compute properties) { - this.innerModel().withProperties(properties); - return this; - } - - public ComputeResourceImpl withProperties(ScaleSettingsInformation properties) { - this.updateParameters.withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputeSecretsImpl.java deleted file mode 100644 index 217d0a038ed7..000000000000 --- 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 1502a033768b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ComputesClientImpl.java +++ /dev/null @@ -1,2858 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.ComputesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ComputesClient. */ -public final class ComputesClientImpl implements ComputesClient { - /** The proxy service used to perform REST calls. */ - private final ComputesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ComputesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ComputesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(ComputesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesComputes to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ComputesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ComputeResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ClusterUpdateParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @QueryParam("underlyingResourceAction") UnderlyingResourceAction underlyingResourceAction, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodes( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> start( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> stop( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart") - @ExpectedResponses({202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> restart( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("computeName") String computeName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNodesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip)); - } - - /** - * Gets computes in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return computes in specified workspace as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, context)); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner get(String resourceGroupName, String workspaceName, String computeName) { - return getWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ComputeResourceInner.class, - ComputeResourceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String computeName, ComputeResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. - * If your intent is to create a new compute, do a GET first to verify that it does not exist yet. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Payload with Machine Learning compute definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ComputeResourceInner parameters, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ComputeResourceInner.class, - ComputeResourceInner.class, - this.client.getContext()); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ComputeResourceInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, computeName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ComputeResourceInner.class, ComputeResourceInner.class, context); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters).getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ComputeResourceInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .getSyncPoller(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, computeName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update( - String resourceGroupName, String workspaceName, String computeName, ClusterUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters).block(); - } - - /** - * Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable - * operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param parameters Additional parameters for cluster update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return machine Learning compute object wrapped into ARM resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeResourceInner update( - String resourceGroupName, - String workspaceName, - String computeName, - ClusterUpdateParameters parameters, - Context context) { - return updateAsync(resourceGroupName, workspaceName, computeName, parameters, context).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono - .error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - underlyingResourceAction, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - if (underlyingResourceAction == null) { - return Mono - .error( - new IllegalArgumentException("Parameter underlyingResourceAction is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - underlyingResourceAction, - accept, - context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .getSyncPoller(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction).block(); - } - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - deleteAsync(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context).block(); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listNodes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNodesSinglePageAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNodes( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().nodes(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync( - String resourceGroupName, String workspaceName, String computeName) { - return new PagedFlux<>( - () -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName), - nextLink -> listNodesNextSinglePageAsync(nextLink)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listNodesAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return new PagedFlux<>( - () -> listNodesSinglePageAsync(resourceGroupName, workspaceName, computeName, context), - nextLink -> listNodesNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName)); - } - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return new PagedIterable<>(listNodesAsync(resourceGroupName, workspaceName, computeName, context)); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String computeName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ComputeSecretsInner listKeys(String resourceGroupName, String workspaceName, String computeName) { - return listKeysWithResponse(resourceGroupName, workspaceName, computeName, Context.NONE).getValue(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String workspaceName, String computeName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - startWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStart( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.beginStartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStartAsync(resourceGroupName, workspaceName, computeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStartAsync(resourceGroupName, workspaceName, computeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName) { - startAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - startAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String workspaceName, String computeName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - stopWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStop( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.beginStopAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginStopAsync(resourceGroupName, workspaceName, computeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginStopAsync(resourceGroupName, workspaceName, computeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName) { - stopAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - stopAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .restart( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> restartWithResponseAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (computeName == null) { - return Mono.error(new IllegalArgumentException("Parameter computeName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .restart( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - computeName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String workspaceName, String computeName) { - Mono>> mono = restartWithResponseAsync(resourceGroupName, workspaceName, computeName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRestartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - restartWithResponseAsync(resourceGroupName, workspaceName, computeName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName).getSyncPoller(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRestart( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.beginRestartAsync(resourceGroupName, workspaceName, computeName, context).getSyncPoller(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync(String resourceGroupName, String workspaceName, String computeName) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono restartAsync( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return beginRestartAsync(resourceGroupName, workspaceName, computeName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName) { - restartAsync(resourceGroupName, workspaceName, computeName).block(); - } - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { - restartAsync(resourceGroupName, workspaceName, computeName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return paginated list of Machine Learning compute objects wrapped in ARM resource envelope along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 9b3cc25f7885..000000000000 --- 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 Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComputeResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComputeResource get(String resourceGroupName, String workspaceName, String computeName) { - ComputeResourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction); - } - - public void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, computeName, underlyingResourceAction, context); - } - - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName); - } - - public PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context) { - return this.serviceClient().listNodes(resourceGroupName, workspaceName, computeName, context); - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, computeName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ComputeSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName) { - ComputeSecretsInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, computeName); - if (inner != null) { - return new ComputeSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - - public void start(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName); - } - - public void start(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().start(resourceGroupName, workspaceName, computeName, context); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName); - } - - public void stop(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().stop(resourceGroupName, workspaceName, computeName, context); - } - - public void restart(String resourceGroupName, String workspaceName, String computeName) { - this.serviceClient().restart(resourceGroupName, workspaceName, computeName); - } - - public void restart(String resourceGroupName, String workspaceName, String computeName, Context context) { - this.serviceClient().restart(resourceGroupName, workspaceName, computeName, context); - } - - public ComputeResource getById(String id) { - String resourceGroupName = 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/DataContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java deleted file mode 100644 index 226bd04ddbb2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainerImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; - -public final class DataContainerImpl implements DataContainer, DataContainer.Definition, DataContainer.Update { - private DataContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DataContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public DataContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public DataContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DataContainerImpl update() { - return this; - } - - public DataContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DataContainerImpl( - DataContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "data"); - } - - public DataContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public DataContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public DataContainerImpl withProperties(DataContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java deleted file mode 100644 index ce1b750a11de..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataContainersClientImpl.java +++ /dev/null @@ -1,915 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.DataContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DataContainersClient. */ -public final class DataContainersClientImpl implements DataContainersClient { - /** The proxy service used to perform REST calls. */ - private final DataContainersService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of DataContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DataContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(DataContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesDataContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface DataContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataContainerInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List data containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DataContainerInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DataContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, DataContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DataContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 2bc8ef7ece53..000000000000 --- 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.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class DataContainersImpl implements DataContainers { - private static final ClientLogger LOGGER = new ClientLogger(DataContainersImpl.class); - - private final DataContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public DataContainersImpl( - DataContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataContainer get(String resourceGroupName, String workspaceName, String name) { - DataContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DataContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataContainer getById(String id) { - String resourceGroupName = 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 DataContainerImpl define(String name) { - return new DataContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.java deleted file mode 100644 index 00c2cd10b375..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionBaseImpl.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.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; - -public final class DataVersionBaseImpl implements DataVersionBase, DataVersionBase.Definition, DataVersionBase.Update { - private DataVersionBaseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DataVersionBaseProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DataVersionBaseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public DataVersionBaseImpl withExistingData(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public DataVersionBase create() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DataVersionBaseInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public DataVersionBaseImpl update() { - return this; - } - - public DataVersionBase apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - DataVersionBaseImpl( - DataVersionBaseInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 DataVersionBase refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public DataVersionBase refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDataVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public DataVersionBaseImpl withProperties(DataVersionBaseProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java deleted file mode 100644 index 3a6cbe8f7954..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsClientImpl.java +++ /dev/null @@ -1,1069 +0,0 @@ -// Copyright (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.DataVersionBaseInner; -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") - public interface DataVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @QueryParam("$tags") String tags, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DataVersionBaseInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - tags, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - tags, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final String tags = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType)); - } - - /** - * List data versions in the data container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Data container's name. - * @param orderBy Please choose OrderBy value from ['createdtime', 'modifiedtime']. - * @param top Top count of results, top count cannot be greater than the page size. If topCount > page size, - * results with be default page size count will be returned. - * @param skip Continuation token for pagination. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param listViewType [ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for - * including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - DataVersionBaseInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DataVersionBaseInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, DataVersionBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of DataVersionBase entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 09fc917310d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DataVersionsImpl.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.DataVersionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersions; -import com.azure.resourcemanager.machinelearning.models.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 DataVersionBaseImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - String tags, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, tags, listViewType, context); - return Utils.mapPage(inner, inner1 -> new DataVersionBaseImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DataVersionBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version) { - DataVersionBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new DataVersionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public DataVersionBase 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 DataVersionBaseImpl define(String name) { - return new DataVersionBaseImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.java deleted file mode 100644 index e1686a772212..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreImpl.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.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.models.Datastore; -import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; -import com.azure.resourcemanager.machinelearning.models.DatastoreSecrets; - -public final class DatastoreImpl implements Datastore, Datastore.Definition, Datastore.Update { - private DatastoreInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public DatastoreProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DatastoreInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private Boolean createSkipValidation; - - private Boolean updateSkipValidation; - - public DatastoreImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Datastore create() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, Context.NONE) - .getValue(); - return this; - } - - public Datastore create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), createSkipValidation, context) - .getValue(); - return this; - } - - DatastoreImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new DatastoreInner(); - this.serviceManager = serviceManager; - this.name = name; - this.createSkipValidation = null; - } - - public DatastoreImpl update() { - this.updateSkipValidation = null; - return this; - } - - public Datastore apply() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, Context.NONE) - .getValue(); - return this; - } - - public Datastore apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, this.innerModel(), updateSkipValidation, context) - .getValue(); - return this; - } - - DatastoreImpl( - DatastoreInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "datastores"); - } - - public Datastore refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public Datastore refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getDatastores() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.datastores().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - } - - public DatastoreSecrets listSecrets() { - return serviceManager.datastores().listSecrets(resourceGroupName, workspaceName, name); - } - - public DatastoreImpl withProperties(DatastoreProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public DatastoreImpl withSkipValidation(Boolean skipValidation) { - if (isInCreateMode()) { - this.createSkipValidation = skipValidation; - return this; - } else { - this.updateSkipValidation = skipValidation; - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoreSecretsImpl.java deleted file mode 100644 index e2678170c231..000000000000 --- 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 62f960a4c3ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DatastoresClientImpl.java +++ /dev/null @@ -1,1239 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.DatastoresClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in DatastoresClient. */ -public final class DatastoresClientImpl implements DatastoresClient { - /** The proxy service used to perform REST calls. */ - private final DatastoresService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of DatastoresClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DatastoresClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(DatastoresService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesDatastores to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface DatastoresService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, - @QueryParam("isDefault") Boolean isDefault, - @QueryParam("names") String names, - @QueryParam("searchText") String searchText, - @QueryParam("orderBy") String orderBy, - @QueryParam("orderByAsc") Boolean orderByAsc, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("skipValidation") Boolean skipValidation, - @BodyParam("application/json") DatastoreInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - String namesConverted = - (names == null) - ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - isDefault, - namesConverted, - searchText, - orderBy, - orderByAsc, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - String namesConverted = - (names == null) - ? null - : names.stream().map(value -> Objects.toString(value, "")).collect(Collectors.joining(",")); - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - isDefault, - namesConverted, - searchText, - orderBy, - orderByAsc, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final Boolean isDefault = null; - final List names = null; - final String searchText = null; - final String orderBy = null; - final Boolean orderByAsc = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, workspaceName, skip, count, isDefault, names, searchText, orderBy, orderByAsc)); - } - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context)); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, DatastoreInner body, Boolean skipValidation) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skipValidation, - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - DatastoreInner body, - Boolean skipValidation, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skipValidation, - body, - accept, - context); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @param skipValidation Flag to skip validation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - DatastoreInner body, - Boolean skipValidation, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, skipValidation, context) - .block(); - } - - /** - * Create or update datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param body Datastore entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, DatastoreInner body) { - final Boolean skipValidation = null; - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, skipValidation, Context.NONE) - .getValue(); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DatastoreSecretsInner listSecrets(String resourceGroupName, String workspaceName, String name) { - return listSecretsWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 bc059720b005..000000000000 --- 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.DatastoreInner; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreSecretsInner; -import com.azure.resourcemanager.machinelearning.models.Datastore; -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 DatastoreImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - skip, - count, - isDefault, - names, - searchText, - orderBy, - orderByAsc, - context); - return Utils.mapPage(inner, inner1 -> new DatastoreImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DatastoreImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Datastore get(String resourceGroupName, String workspaceName, String name) { - DatastoreInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DatastoreSecretsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name) { - DatastoreSecretsInner inner = this.serviceClient().listSecrets(resourceGroupName, workspaceName, name); - if (inner != null) { - return new DatastoreSecretsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Datastore getById(String id) { - String resourceGroupName = 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 DatastoreImpl define(String name) { - return new DatastoreImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/DeploymentLogsImpl.java deleted file mode 100644 index e3f96c2eabf7..000000000000 --- 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 7b4dfe310ada..000000000000 --- 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 5cd99472c86a..000000000000 --- 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 2bb22886310c..000000000000 --- 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 72da8064892e..000000000000 --- 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/EnvironmentContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.java deleted file mode 100644 index 4ee12b6fd24e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainerImpl.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.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; - -public final class EnvironmentContainerImpl - implements EnvironmentContainer, EnvironmentContainer.Definition, EnvironmentContainer.Update { - private EnvironmentContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EnvironmentContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public EnvironmentContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public EnvironmentContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public EnvironmentContainerImpl update() { - return this; - } - - public EnvironmentContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentContainerImpl( - EnvironmentContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "environments"); - } - - public EnvironmentContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public EnvironmentContainerImpl withProperties(EnvironmentContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java deleted file mode 100644 index d569783d4fc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersClientImpl.java +++ /dev/null @@ -1,916 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in EnvironmentContainersClient. */ -public final class EnvironmentContainersClientImpl implements EnvironmentContainersClient { - /** The proxy service used to perform REST calls. */ - private final EnvironmentContainersService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of EnvironmentContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - EnvironmentContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(EnvironmentContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesEnvironmentContainers to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface EnvironmentContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentContainerInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List environment containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, EnvironmentContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 acbe2b72b83e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentContainersImpl.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.EnvironmentContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainers; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class EnvironmentContainersImpl implements EnvironmentContainers { - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentContainersImpl.class); - - private final EnvironmentContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public EnvironmentContainersImpl( - EnvironmentContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String skip, ListViewType listViewType, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnvironmentContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentContainer get(String resourceGroupName, String workspaceName, String name) { - EnvironmentContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new EnvironmentContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentContainer getById(String id) { - String resourceGroupName = 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 EnvironmentContainerImpl define(String name) { - return new EnvironmentContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.java deleted file mode 100644 index 653ef01782d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionImpl.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.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; - -public final class EnvironmentVersionImpl - implements EnvironmentVersion, EnvironmentVersion.Definition, EnvironmentVersion.Update { - private EnvironmentVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public EnvironmentVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public EnvironmentVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public EnvironmentVersionImpl withExistingEnvironment(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public EnvironmentVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new EnvironmentVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public EnvironmentVersionImpl update() { - return this; - } - - public EnvironmentVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - EnvironmentVersionImpl( - EnvironmentVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 EnvironmentVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public EnvironmentVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getEnvironmentVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public EnvironmentVersionImpl withProperties(EnvironmentVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/EnvironmentVersionsClientImpl.java deleted file mode 100644 index 0f6b8a58aa6d..000000000000 --- 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.EnvironmentVersionInner; -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") - public interface EnvironmentVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions" - + "/{version}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") EnvironmentVersionInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - orderBy, - top, - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType)); - } - - /** - * List versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param skip Continuation token for pagination. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - EnvironmentVersionInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Creates or updates an EnvironmentVersion. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @param version Version of EnvironmentVersion. - * @param body Definition of EnvironmentVersion. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, EnvironmentVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of EnvironmentVersion entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 3c075afbe0d9..000000000000 --- 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.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersions; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class EnvironmentVersionsImpl implements EnvironmentVersions { - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVersionsImpl.class); - - private final EnvironmentVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public EnvironmentVersionsImpl( - EnvironmentVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String orderBy, - Integer top, - String skip, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list(resourceGroupName, workspaceName, name, orderBy, top, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new EnvironmentVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EnvironmentVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version) { - EnvironmentVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new EnvironmentVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public EnvironmentVersion 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 EnvironmentVersionImpl define(String name) { - return new EnvironmentVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ExternalFqdnResponseImpl.java deleted file mode 100644 index 7f27891cd16a..000000000000 --- 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/JobBaseImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.java deleted file mode 100644 index 1b26fd5f42d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobBaseImpl.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.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; - -public final class JobBaseImpl implements JobBase, JobBase.Definition, JobBase.Update { - private JobBaseInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public JobBaseProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JobBaseInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String id; - - public JobBaseImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public JobBase create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBase create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new JobBaseInner(); - this.serviceManager = serviceManager; - this.id = name; - } - - public JobBaseImpl update() { - return this; - } - - public JobBase apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public JobBase apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, id, this.innerModel(), context) - .getValue(); - return this; - } - - JobBaseImpl( - JobBaseInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.id = Utils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public JobBase refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, Context.NONE) - .getValue(); - return this; - } - - public JobBase refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getWithResponse(resourceGroupName, workspaceName, id, context) - .getValue(); - return this; - } - - public void cancel() { - serviceManager.jobs().cancel(resourceGroupName, workspaceName, id); - } - - public void cancel(Context context) { - serviceManager.jobs().cancel(resourceGroupName, workspaceName, id, context); - } - - public JobBaseImpl withProperties(JobBaseProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java deleted file mode 100644 index f19ceaef9cf4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsClientImpl.java +++ /dev/null @@ -1,1330 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in JobsClient. */ -public final class JobsClientImpl implements JobsClient { - /** The proxy service used to perform REST calls. */ - private final JobsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesJobs to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("jobType") String jobType, - @QueryParam("tag") String tag, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobBaseInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> cancel( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("id") String id, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists Jobs in the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param jobType Type of job to be returned. - * @param tag Jobs returned will have this tag key. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("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, - 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), - 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; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType), - 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, 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; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType)); - } - - /** - * 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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the 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, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context)); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String id) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String id) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id).getSyncPoller(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String id, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String id) { - return beginDeleteAsync(resourceGroupName, workspaceName, id) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, id, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String id) { - deleteAsync(resourceGroupName, workspaceName, id).block(); - } - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String id, Context context) { - deleteAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String id) { - return getWithResponseAsync(resourceGroupName, workspaceName, id) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner get(String resourceGroupName, String workspaceName, String id) { - return getWithResponse(resourceGroupName, workspaceName, id, Context.NONE).getValue(); - } - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String id, JobBaseInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String id, JobBaseInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String id, JobBaseInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, id, body, context).block(); - } - - /** - * Creates and executes a Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param body Job definition object. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobBaseInner createOrUpdate(String resourceGroupName, String workspaceName, String id, JobBaseInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, id, body, Context.NONE).getValue(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync( - String resourceGroupName, String workspaceName, String id) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> cancelWithResponseAsync( - String resourceGroupName, String workspaceName, String id, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (id == null) { - return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .cancel( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - id, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync( - String resourceGroupName, String workspaceName, String id) { - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginCancelAsync( - String resourceGroupName, String workspaceName, String id, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = cancelWithResponseAsync(resourceGroupName, workspaceName, id, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel(String resourceGroupName, String workspaceName, String id) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id).getSyncPoller(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginCancel( - String resourceGroupName, String workspaceName, String id, Context context) { - return this.beginCancelAsync(resourceGroupName, workspaceName, id, context).getSyncPoller(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String workspaceName, String id) { - return beginCancelAsync(resourceGroupName, workspaceName, id) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono cancelAsync(String resourceGroupName, String workspaceName, String id, Context context) { - return beginCancelAsync(resourceGroupName, workspaceName, id, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String workspaceName, String id) { - cancelAsync(resourceGroupName, workspaceName, id).block(); - } - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { - cancelAsync(resourceGroupName, workspaceName, id, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 8acf713adc9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/JobsImpl.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.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.JobsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.Jobs; -import com.azure.resourcemanager.machinelearning.models.ListViewType; - -public final class JobsImpl implements Jobs { - private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public JobsImpl( - JobsClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - String jobType, - String tag, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, jobType, tag, listViewType, context); - return Utils.mapPage(inner, inner1 -> new JobBaseImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String id) { - this.serviceClient().delete(resourceGroupName, workspaceName, id); - } - - public void delete(String resourceGroupName, String workspaceName, String id, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, id, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String id, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, id, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new JobBaseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JobBase get(String resourceGroupName, String workspaceName, String id) { - JobBaseInner inner = this.serviceClient().get(resourceGroupName, workspaceName, id); - if (inner != null) { - return new JobBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void cancel(String resourceGroupName, String workspaceName, String id) { - this.serviceClient().cancel(resourceGroupName, workspaceName, id); - } - - public void cancel(String resourceGroupName, String workspaceName, String id, Context context) { - this.serviceClient().cancel(resourceGroupName, workspaceName, id, context); - } - - public JobBase getById(String id) { - String resourceGroupName = 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 JobBaseImpl define(String name) { - return new JobBaseImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ListNotebookKeysResultImpl.java deleted file mode 100644 index 66fa88be97b1..000000000000 --- 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 5b7e3b40f651..000000000000 --- 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 02beede5a627..000000000000 --- 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/ModelContainerImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java deleted file mode 100644 index dc2e9e476a07..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainerImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; - -public final class ModelContainerImpl implements ModelContainer, ModelContainer.Definition, ModelContainer.Update { - private ModelContainerInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ModelContainerProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelContainerInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ModelContainerImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public ModelContainer create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainer create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelContainerInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ModelContainerImpl update() { - return this; - } - - public ModelContainer apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelContainer apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, this.innerModel(), context) - .getValue(); - return this; - } - - ModelContainerImpl( - ModelContainerInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "models"); - } - - public ModelContainer refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public ModelContainer refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelContainers() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ModelContainerImpl withProperties(ModelContainerProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java deleted file mode 100644 index 85257b0ad80f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelContainersClientImpl.java +++ /dev/null @@ -1,940 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.ModelContainersClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in ModelContainersClient. */ -public final class ModelContainersClientImpl implements ModelContainersClient { - /** The proxy service used to perform REST calls. */ - private final ModelContainersService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of ModelContainersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ModelContainersClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(ModelContainersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesModelContainers to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface ModelContainersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("count") Integer count, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelContainerInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - count, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, Integer count, ListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, count, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final Integer count = null; - final ListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType)); - } - - /** - * List model containers. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelContainer entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, count, listViewType, context)); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteWithResponse(resourceGroupName, workspaceName, name, Context.NONE); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Create or update container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param body Container entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelContainerInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ModelContainerInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, body, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 d45d40ce56ae..000000000000 --- 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.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainers; - -public final class ModelContainersImpl implements ModelContainers { - private static final ClientLogger LOGGER = new ClientLogger(ModelContainersImpl.class); - - private final ModelContainersClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ModelContainersImpl( - ModelContainersClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, count, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ModelContainerImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ModelContainerImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelContainer get(String resourceGroupName, String workspaceName, String name) { - ModelContainerInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ModelContainerImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelContainer getById(String id) { - String resourceGroupName = 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 ModelContainerImpl define(String name) { - return new ModelContainerImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.java deleted file mode 100644 index 8d4bf2161686..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionImpl.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.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; - -public final class ModelVersionImpl implements ModelVersion, ModelVersion.Definition, ModelVersion.Update { - private ModelVersionInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ModelVersionProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ModelVersionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - private String version; - - public ModelVersionImpl withExistingModel(String resourceGroupName, String workspaceName, String name) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.name = name; - return this; - } - - public ModelVersion create() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelVersion create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ModelVersionInner(); - this.serviceManager = serviceManager; - this.version = name; - } - - public ModelVersionImpl update() { - return this; - } - - public ModelVersion apply() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse( - resourceGroupName, workspaceName, name, version, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public ModelVersion apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, this.innerModel(), context) - .getValue(); - return this; - } - - ModelVersionImpl( - ModelVersionInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 ModelVersion refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE) - .getValue(); - return this; - } - - public ModelVersion refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getModelVersions() - .getWithResponse(resourceGroupName, workspaceName, name, version, context) - .getValue(); - return this; - } - - public ModelVersionImpl withProperties(ModelVersionProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java deleted file mode 100644 index 7c3ba0c615b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ModelVersionsClientImpl.java +++ /dev/null @@ -1,1202 +0,0 @@ -// Copyright (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.ModelVersionInner; -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") - public interface ModelVersionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("version") String version, - @QueryParam("description") String description, - @QueryParam("offset") Integer offset, - @QueryParam("tags") String tags, - @QueryParam("properties") String properties, - @QueryParam("feed") String feed, - @QueryParam("listViewType") ListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @PathParam("version") String version, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ModelVersionInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - final String skip = null; - final String orderBy = null; - final Integer top = null; - final String version = null; - final String description = null; - final Integer offset = null; - final String tags = null; - final String properties = null; - final String feed = null; - final ListViewType listViewType = null; - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType)); - } - - /** - * List model versions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Model name. This is case-sensitive. - * @param skip Continuation token for pagination. - * @param orderBy Ordering of list. - * @param top Maximum number of records to return. - * @param version Model version. - * @param description Model description. - * @param offset Number of initial results to skip. - * @param tags Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2. - * @param properties Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2. - * @param feed Name of the feed. - * @param listViewType View type for including/excluding (for example) archived entities. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context)); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, String version) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - deleteWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, version, context).block(); - } - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner get(String resourceGroupName, String workspaceName, String name, String version) { - return getWithResponse(resourceGroupName, workspaceName, name, version, Context.NONE).getValue(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (version == null) { - return Mono.error(new IllegalArgumentException("Parameter version is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - version, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String name, - String version, - ModelVersionInner body, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, version, body, context).block(); - } - - /** - * Create or update version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param body Version entity to create or update. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ModelVersionInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, String version, ModelVersionInner body) { - return createOrUpdateWithResponse(resourceGroupName, workspaceName, name, version, body, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of ModelVersion entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 c592838cdb9c..000000000000 --- 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.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersions; - -public final class ModelVersionsImpl implements ModelVersions { - private static final ClientLogger LOGGER = new ClientLogger(ModelVersionsImpl.class); - - private final ModelVersionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public ModelVersionsImpl( - ModelVersionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String name) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName, name); - return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - String skip, - String orderBy, - Integer top, - String version, - String description, - Integer offset, - String tags, - String properties, - String feed, - ListViewType listViewType, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - name, - skip, - orderBy, - top, - version, - description, - offset, - tags, - properties, - feed, - listViewType, - context); - return Utils.mapPage(inner, inner1 -> new ModelVersionImpl(inner1, this.manager())); - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, name, version, context); - } - - public void delete(String resourceGroupName, String workspaceName, String name, String version) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, version); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, version, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ModelVersionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ModelVersion get(String resourceGroupName, String workspaceName, String name, String version) { - ModelVersionInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name, version); - if (inner != null) { - return new ModelVersionImpl(inner, this.manager()); - } else { - return null; - } - } - - public ModelVersion 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 ModelVersionImpl define(String name) { - return new ModelVersionImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/NotebookAccessTokenResultImpl.java deleted file mode 100644 index 56f19f2680b1..000000000000 --- 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 79a6782c20d9..000000000000 --- 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/OnlineDeploymentImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java deleted file mode 100644 index d6f213d3eda4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class OnlineDeploymentImpl - implements OnlineDeployment, OnlineDeployment.Definition, OnlineDeployment.Update { - private OnlineDeploymentInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public OnlineDeploymentProperties 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 OnlineDeploymentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private String deploymentName; - - private PartialMinimalTrackedResourceWithSku updateBody; - - public OnlineDeploymentImpl withExistingOnlineEndpoint( - String resourceGroupName, String workspaceName, String endpointName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - this.endpointName = endpointName; - return this; - } - - public OnlineDeployment create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), Context.NONE); - return this; - } - - public OnlineDeployment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .createOrUpdate( - resourceGroupName, workspaceName, endpointName, deploymentName, this.innerModel(), context); - return this; - } - - OnlineDeploymentImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineDeploymentInner(); - this.serviceManager = serviceManager; - this.deploymentName = name; - } - - public OnlineDeploymentImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithSku(); - return this; - } - - public OnlineDeployment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, Context.NONE); - return this; - } - - public OnlineDeployment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .update(resourceGroupName, workspaceName, endpointName, deploymentName, updateBody, context); - return this; - } - - OnlineDeploymentImpl( - OnlineDeploymentInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = 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 OnlineDeployment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE) - .getValue(); - return this; - } - - public OnlineDeployment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineDeployments() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getValue(); - return this; - } - - public Response getLogsWithResponse(DeploymentLogsRequest body, Context context) { - return serviceManager - .onlineDeployments() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - } - - public DeploymentLogs getLogs(DeploymentLogsRequest body) { - return serviceManager - .onlineDeployments() - .getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); - } - - public OnlineDeploymentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineDeploymentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineDeploymentImpl withProperties(OnlineDeploymentProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineDeploymentImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineDeploymentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineDeploymentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public OnlineDeploymentImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineDeploymentImpl withSku(PartialSku sku) { - this.updateBody.withSku(sku); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java deleted file mode 100644 index 8008e9361ade..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsClientImpl.java +++ /dev/null @@ -1,2284 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OnlineDeploymentsClient. */ -public final class OnlineDeploymentsClientImpl implements OnlineDeploymentsClient { - /** The proxy service used to perform REST calls. */ - private final OnlineDeploymentsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OnlineDeploymentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OnlineDeploymentsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(OnlineDeploymentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineDeployments to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface OnlineDeploymentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$orderBy") String orderBy, - @QueryParam("$top") Integer top, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithSku body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineDeploymentInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/getLogs") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getLogs( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DeploymentLogsRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/deployments/{deploymentName}/skus") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkus( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @PathParam("deploymentName") String deploymentName, - @QueryParam("api-version") String apiVersion, - @QueryParam("count") Integer count, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listSkusNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - orderBy, - top, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - orderBy, - top, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName, String orderBy, Integer top, String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String endpointName) { - final String orderBy = null; - final Integer top = null; - final String skip = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip)); - } - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context)); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).getSyncPoller(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return this - .beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .getSyncPoller(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName).block(); - } - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, context).block(); - } - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, Context.NONE).getValue(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentInner.class, - OnlineDeploymentInner.class, - this.client.getContext()); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - return this - .beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Update Online Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - PartialMinimalTrackedResourceWithSku body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context).block(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineDeploymentInner.class, - OnlineDeploymentInner.class, - this.client.getContext()); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineDeploymentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineDeploymentInner.class, OnlineDeploymentInner.class, context); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .getSyncPoller(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineDeploymentInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .getSyncPoller(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body).block(); - } - - /** - * Create or update Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param body Inference Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineDeploymentInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - OnlineDeploymentInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getLogsWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getLogs( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getLogsAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { - return getLogsWithResponseAsync(resourceGroupName, workspaceName, endpointName, deploymentName, body, context) - .block(); - } - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DeploymentLogsInner getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - return getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, Context.NONE) - .getValue(); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - count, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSkusSinglePageAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (deploymentName == null) { - return Mono.error(new IllegalArgumentException("Parameter deploymentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listSkus( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - deploymentName, - this.client.getApiVersion(), - count, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip) { - return new PagedFlux<>( - () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), - nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - final Integer count = null; - final String skip = null; - return new PagedFlux<>( - () -> listSkusSinglePageAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip), - nextLink -> listSkusNextSinglePageAsync(nextLink)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listSkusAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { - return new PagedFlux<>( - () -> - listSkusSinglePageAsync( - resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context), - nextLink -> listSkusNextSinglePageAsync(nextLink, context)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - final Integer count = null; - final String skip = null; - return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip)); - } - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context) { - return new PagedIterable<>( - listSkusAsync(resourceGroupName, workspaceName, endpointName, deploymentName, count, skip, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 4c98b529a0d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineDeploymentsImpl.java +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.OnlineDeploymentsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.OnlineDeployments; -import com.azure.resourcemanager.machinelearning.models.SkuResource; - -public final class OnlineDeploymentsImpl implements OnlineDeployments { - private static final ClientLogger LOGGER = new ClientLogger(OnlineDeploymentsImpl.class); - - private final OnlineDeploymentsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public OnlineDeploymentsImpl( - OnlineDeploymentsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName, String endpointName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, endpointName, orderBy, top, skip, context); - return Utils.mapPage(inner, inner1 -> new OnlineDeploymentImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName); - } - - public void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, deploymentName, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OnlineDeploymentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnlineDeployment get( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - OnlineDeploymentInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, endpointName, deploymentName); - if (inner != null) { - return new OnlineDeploymentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context) { - Response inner = - this - .serviceClient() - .getLogsWithResponse(resourceGroupName, workspaceName, endpointName, deploymentName, body, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DeploymentLogsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DeploymentLogs getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body) { - DeploymentLogsInner inner = - this.serviceClient().getLogs(resourceGroupName, workspaceName, endpointName, deploymentName, body); - if (inner != null) { - return new DeploymentLogsImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName) { - PagedIterable inner = - this.serviceClient().listSkus(resourceGroupName, workspaceName, endpointName, deploymentName); - return 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 OnlineDeployment 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 OnlineDeploymentImpl define(String name) { - return new OnlineDeploymentImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java deleted file mode 100644 index f45e6848ce3a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthToken; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import com.azure.resourcemanager.machinelearning.models.Sku; -import java.util.Collections; -import java.util.Map; - -public final class OnlineEndpointImpl implements OnlineEndpoint, OnlineEndpoint.Definition, OnlineEndpoint.Update { - private OnlineEndpointInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String kind() { - return this.innerModel().kind(); - } - - public OnlineEndpointProperties 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 OnlineEndpointInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String endpointName; - - private PartialMinimalTrackedResourceWithIdentity updateBody; - - public OnlineEndpointImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public OnlineEndpoint create() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), Context.NONE); - return this; - } - - public OnlineEndpoint create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .createOrUpdate(resourceGroupName, workspaceName, endpointName, this.innerModel(), context); - return this; - } - - OnlineEndpointImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new OnlineEndpointInner(); - this.serviceManager = serviceManager; - this.endpointName = name; - } - - public OnlineEndpointImpl update() { - this.updateBody = new PartialMinimalTrackedResourceWithIdentity(); - return this; - } - - public OnlineEndpoint apply() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, Context.NONE); - return this; - } - - public OnlineEndpoint apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .update(resourceGroupName, workspaceName, endpointName, updateBody, context); - return this; - } - - OnlineEndpointImpl( - OnlineEndpointInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.endpointName = Utils.getValueFromIdByName(innerObject.id(), "onlineEndpoints"); - } - - public OnlineEndpoint refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE) - .getValue(); - return this; - } - - public OnlineEndpoint refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getOnlineEndpoints() - .getWithResponse(resourceGroupName, workspaceName, endpointName, context) - .getValue(); - return this; - } - - public Response listKeysWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthKeys listKeys() { - return serviceManager.onlineEndpoints().listKeys(resourceGroupName, workspaceName, endpointName); - } - - public void regenerateKeys(RegenerateEndpointKeysRequest body) { - serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); - } - - public void regenerateKeys(RegenerateEndpointKeysRequest body, Context context) { - serviceManager.onlineEndpoints().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); - } - - public Response getTokenWithResponse(Context context) { - return serviceManager - .onlineEndpoints() - .getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - } - - public EndpointAuthToken getToken() { - return serviceManager.onlineEndpoints().getToken(resourceGroupName, workspaceName, endpointName); - } - - public OnlineEndpointImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public OnlineEndpointImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public OnlineEndpointImpl withProperties(OnlineEndpointProperties properties) { - this.innerModel().withProperties(properties); - return this; - } - - public OnlineEndpointImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBody.withTags(tags); - return this; - } - } - - public OnlineEndpointImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public OnlineEndpointImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public OnlineEndpointImpl withSku(Sku sku) { - this.innerModel().withSku(sku); - return this; - } - - public OnlineEndpointImpl withIdentity(PartialManagedServiceIdentity identity) { - this.updateBody.withIdentity(identity); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java deleted file mode 100644 index 07f7cfd7be98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OnlineEndpointsClientImpl.java +++ /dev/null @@ -1,2279 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.OnlineEndpointsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthKeysInner; -import com.azure.resourcemanager.machinelearning.fluent.models.EndpointAuthTokenInner; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in OnlineEndpointsClient. */ -public final class OnlineEndpointsClientImpl implements OnlineEndpointsClient { - /** The proxy service used to perform REST calls. */ - private final OnlineEndpointsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of OnlineEndpointsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OnlineEndpointsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(OnlineEndpointsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesOnlineEndpoints to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface OnlineEndpointsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("name") String name, - @QueryParam("count") Integer count, - @QueryParam("computeType") EndpointComputeType computeType, - @QueryParam("$skip") String skip, - @QueryParam("tags") String tags, - @QueryParam("properties") String properties, - @QueryParam("orderBy") OrderString orderBy, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PartialMinimalTrackedResourceWithIdentity body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") OnlineEndpointInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/listKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}" - + "/regenerateKeys") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> regenerateKeys( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") RegenerateEndpointKeysRequest body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getToken( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("endpointName") String endpointName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - return new PagedFlux<>( - () -> - listSinglePageAsync( - resourceGroupName, - workspaceName, - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String name = null; - final Integer count = null; - final EndpointComputeType computeType = null; - final String skip = null; - final String tags = null; - final String properties = null; - final OrderString orderBy = null; - return new PagedIterable<>( - listAsync(resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy)); - } - - /** - * List Online Endpoints. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of the endpoint. - * @param count Number of endpoints to be retrieved in a page of results. - * @param computeType EndpointComputeType to be filtered by. - * @param skip Continuation token for pagination. - * @param tags A set of tags with which to filter the returned models. It is a comma separated string of tags key or - * tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 . - * @param properties A set of properties with which to filter the returned models. It is a comma separated string of - * properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 . - * @param orderBy The option to order the response. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - return new PagedIterable<>( - listAsync( - resourceGroupName, workspaceName, name, count, computeType, skip, tags, properties, orderBy, context)); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, endpointName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName).getSyncPoller(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context).getSyncPoller(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String endpointName) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, endpointName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - deleteAsync(resourceGroupName, workspaceName, endpointName).block(); - } - - /** - * Delete Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - deleteAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner get(String resourceGroupName, String workspaceName, String endpointName) { - return getWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointInner.class, - OnlineEndpointInner.class, - this.client.getContext()); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).getSyncPoller(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner update( - String resourceGroupName, - String workspaceName, - String endpointName, - PartialMinimalTrackedResourceWithIdentity body, - Context context) { - return updateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - OnlineEndpointInner.class, - OnlineEndpointInner.class, - this.client.getContext()); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, OnlineEndpointInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), OnlineEndpointInner.class, OnlineEndpointInner.class, context); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, OnlineEndpointInner> beginCreateOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate( - String resourceGroupName, String workspaceName, String endpointName, OnlineEndpointInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Create or update Online Endpoint (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body Online Endpoint entity to apply during operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public OnlineEndpointInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String endpointName, - OnlineEndpointInner body, - Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync( - String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EndpointAuthKeysInner listKeys(String resourceGroupName, String workspaceName, String endpointName) { - return listKeysWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .regenerateKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> regenerateKeysWithResponseAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (endpointName == null) { - return Mono.error(new IllegalArgumentException("Parameter endpointName is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .regenerateKeys( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - endpointName, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - Mono>> mono = - regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginRegenerateKeysAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - regenerateKeysWithResponseAsync(resourceGroupName, workspaceName, endpointName, body, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - return this.beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginRegenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - return this - .beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) - .getSyncPoller(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono regenerateKeysAsync( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - return beginRegenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body).block(); - } - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - regenerateKeysAsync(resourceGroupName, workspaceName, endpointName, body, context).block(); - } - - /** - * Retrieve a valid 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return service Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - return getTokenWithResponseAsync(resourceGroupName, workspaceName, endpointName, context).block(); - } - - /** - * Retrieve a valid 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 getTokenWithResponse(resourceGroupName, workspaceName, endpointName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineEndpoint entities along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 6bf5914ab736..000000000000 --- 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.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthKeys; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthToken; -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoints; -import com.azure.resourcemanager.machinelearning.models.OrderString; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -public final class OnlineEndpointsImpl implements OnlineEndpoints { - private static final ClientLogger LOGGER = new ClientLogger(OnlineEndpointsImpl.class); - - private final OnlineEndpointsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public OnlineEndpointsImpl( - OnlineEndpointsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String name, - Integer count, - EndpointComputeType computeType, - String skip, - String tags, - String properties, - OrderString orderBy, - Context context) { - PagedIterable inner = - this - .serviceClient() - .list( - resourceGroupName, - workspaceName, - name, - count, - computeType, - skip, - tags, - properties, - orderBy, - context); - return Utils.mapPage(inner, inner1 -> new OnlineEndpointImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName); - } - - public void delete(String resourceGroupName, String workspaceName, String endpointName, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, endpointName, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new OnlineEndpointImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName) { - OnlineEndpointInner inner = this.serviceClient().get(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new OnlineEndpointImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EndpointAuthKeysImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthKeysInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthKeysImpl(inner, this.manager()); - } else { - return null; - } - } - - public void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body) { - this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body); - } - - public void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context) { - this.serviceClient().regenerateKeys(resourceGroupName, workspaceName, endpointName, body, context); - } - - public Response getTokenWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context) { - Response inner = - this.serviceClient().getTokenWithResponse(resourceGroupName, workspaceName, endpointName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new EndpointAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EndpointAuthToken getToken(String resourceGroupName, String workspaceName, String endpointName) { - EndpointAuthTokenInner inner = this.serviceClient().getToken(resourceGroupName, workspaceName, endpointName); - if (inner != null) { - return new EndpointAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public OnlineEndpoint getById(String id) { - String resourceGroupName = 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 OnlineEndpointImpl define(String name) { - return new OnlineEndpointImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsClientImpl.java deleted file mode 100644 index da8db6fc97aa..000000000000 --- 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") - public interface OperationsService { - @Headers({"Content-Type: application/json"}) - @Get("/providers/Microsoft.MachineLearningServices/operations") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all of the available Azure Machine Learning Workspaces REST API operations. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 9a500e365bd6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.OperationsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.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 edc0d80a01ea..000000000000 --- 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 a2ee937022f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,836 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.PrivateEndpointConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ -public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - /** The proxy service used to perform REST calls. */ - private final PrivateEndpointConnectionsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of PrivateEndpointConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - PrivateEndpointConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create( - PrivateEndpointConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesPrivateEndpointConnections to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface PrivateEndpointConnectionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") PrivateEndpointConnectionInner properties, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections" - + "/{privateEndpointConnectionName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace along with {@link - * PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, workspaceName, context)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * List all the private endpoint connections associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return list of private endpoint connection associated with the specified workspace as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context).block(); - } - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE) - .getValue(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - properties, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - if (properties == null) { - return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null.")); - } else { - properties.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - properties, - accept, - context); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties, context) - .block(); - } - - /** - * Update the state of specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param properties The private endpoint connection properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Private Endpoint Connection resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateEndpointConnectionInner createOrUpdate( - String resourceGroupName, - String workspaceName, - String privateEndpointConnectionName, - PrivateEndpointConnectionInner properties) { - return createOrUpdateWithResponse( - resourceGroupName, workspaceName, privateEndpointConnectionName, properties, Context.NONE) - .getValue(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (privateEndpointConnectionName == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter privateEndpointConnectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - privateEndpointConnectionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, privateEndpointConnectionName, context) - .block(); - } - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateEndpointConnectionsImpl.java deleted file mode 100644 index 33910826bfaf..000000000000 --- 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 Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - Response inner = - this - .serviceClient() - .getWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateEndpointConnection get( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - PrivateEndpointConnectionInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, privateEndpointConnectionName); - if (inner != null) { - return new PrivateEndpointConnectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, workspaceName, privateEndpointConnectionName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, privateEndpointConnectionName); - } - - public PrivateEndpointConnection getById(String id) { - String resourceGroupName = 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 14109bebe803..000000000000 --- 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 e5f6ffba120f..000000000000 --- 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") - public interface PrivateLinkResourcesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String workspaceName) { - return listWithResponseAsync(resourceGroupName, workspaceName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public PrivateLinkResourceListResultInner list(String resourceGroupName, String workspaceName) { - return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/PrivateLinkResourcesImpl.java deleted file mode 100644 index d230fde3cbf9..000000000000 --- 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 Response listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName) { - PrivateLinkResourceListResultInner inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return new PrivateLinkResourceListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private PrivateLinkResourcesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java deleted file mode 100644 index d639dc8a9983..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/QuotasClientImpl.java +++ /dev/null @@ -1,480 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.QuotasClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in QuotasClient. */ -public final class QuotasClientImpl implements QuotasClient { - /** The proxy service used to perform REST calls. */ - private final QuotasService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of QuotasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - QuotasClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(QuotasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesQuotas to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface QuotasService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}" - + "/updateQuotas") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") QuotaUpdateParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String location, QuotaUpdateParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String location, QuotaUpdateParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - parameters, - accept, - context); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String location, QuotaUpdateParameters parameters) { - return updateWithResponseAsync(location, parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context) { - return updateWithResponseAsync(location, parameters, context).block(); - } - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UpdateWorkspaceQuotasResultInner update(String location, QuotaUpdateParameters parameters) { - return updateWithResponse(location, parameters, Context.NONE).getValue(); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 14cdcd39648d..000000000000 --- 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 Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context) { - Response inner = - this.serviceClient().updateWithResponse(location, parameters, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new UpdateWorkspaceQuotasResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters) { - UpdateWorkspaceQuotasResultInner inner = this.serviceClient().update(location, parameters); - if (inner != null) { - return new UpdateWorkspaceQuotasResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return 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 a16025c4b7b7..000000000000 --- 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/ScheduleImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java deleted file mode 100644 index a4b080c85af2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/ScheduleImpl.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; - -public final class ScheduleImpl implements Schedule, Schedule.Definition, Schedule.Update { - private ScheduleInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public ScheduleProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ScheduleInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String name; - - public ScheduleImpl withExistingWorkspace(String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public Schedule create() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public Schedule create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - ScheduleImpl(String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new ScheduleInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public ScheduleImpl update() { - return this; - } - - public Schedule apply() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), Context.NONE); - return this; - } - - public Schedule apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .createOrUpdate(resourceGroupName, workspaceName, name, this.innerModel(), context); - return this; - } - - ScheduleImpl( - ScheduleInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); - this.name = Utils.getValueFromIdByName(innerObject.id(), "schedules"); - } - - public Schedule refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, Context.NONE) - .getValue(); - return this; - } - - public Schedule refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getSchedules() - .getWithResponse(resourceGroupName, workspaceName, name, context) - .getValue(); - return this; - } - - public ScheduleImpl withProperties(ScheduleProperties properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java deleted file mode 100644 index 5b592b442ec7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesClientImpl.java +++ /dev/null @@ -1,1141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in SchedulesClient. */ -public final class SchedulesClientImpl implements SchedulesClient { - /** The proxy service used to perform REST calls. */ - private final SchedulesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of SchedulesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - SchedulesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(SchedulesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesSchedules to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface SchedulesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$skip") String skip, - @QueryParam("listViewType") ScheduleListViewType listViewType, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ScheduleInner body, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - skip, - listViewType, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String skip, ScheduleListViewType listViewType) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, skip, listViewType, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - final String skip = null; - final ScheduleListViewType listViewType = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType)); - } - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, skip, listViewType, context)); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, name); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, workspaceName, name, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String name) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name).getSyncPoller(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, String name, Context context) { - return this.beginDeleteAsync(resourceGroupName, workspaceName, name, context).getSyncPoller(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name) { - return beginDeleteAsync(resourceGroupName, workspaceName, name) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String name, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, name, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name) { - deleteAsync(resourceGroupName, workspaceName, name).block(); - } - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - deleteAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String name, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String workspaceName, String name) { - return getWithResponseAsync(resourceGroupName, workspaceName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, name, context).block(); - } - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner get(String resourceGroupName, String workspaceName, String name) { - return getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope along with {@link Response} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (body == null) { - return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null.")); - } else { - body.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - name, - this.client.getApiVersion(), - body, - accept, - context); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ScheduleInner.class, - ScheduleInner.class, - this.client.getContext()); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ScheduleInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, name, body, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ScheduleInner.class, ScheduleInner.class, context); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body).getSyncPoller(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ScheduleInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).getSyncPoller(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, name, body, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body).block(); - } - - /** - * Create or update schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param body Schedule definition. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return azure Resource Manager resource envelope. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ScheduleInner createOrUpdate( - String resourceGroupName, String workspaceName, String name, ScheduleInner body, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, name, body, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 Schedule entities along with {@link PagedResponse} on successful completion of {@link - * Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java deleted file mode 100644 index af20e658dc52..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SchedulesImpl.java +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.SchedulesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import com.azure.resourcemanager.machinelearning.models.Schedules; - -public final class SchedulesImpl implements Schedules { - private static final ClientLogger LOGGER = new ClientLogger(SchedulesImpl.class); - - private final SchedulesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public SchedulesImpl( - SchedulesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String workspaceName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, workspaceName); - return Utils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, skip, listViewType, context); - return Utils.mapPage(inner, inner1 -> new ScheduleImpl(inner1, this.manager())); - } - - public void delete(String resourceGroupName, String workspaceName, String name) { - this.serviceClient().delete(resourceGroupName, workspaceName, name); - } - - public void delete(String resourceGroupName, String workspaceName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, workspaceName, name, context); - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, name, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ScheduleImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Schedule get(String resourceGroupName, String workspaceName, String name) { - ScheduleInner inner = this.serviceClient().get(resourceGroupName, workspaceName, name); - if (inner != null) { - return new ScheduleImpl(inner, this.manager()); - } else { - return null; - } - } - - public Schedule getById(String id) { - String resourceGroupName = 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, "schedules"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = 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, "schedules"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - return this.getWithResponse(resourceGroupName, workspaceName, name, context); - } - - public void deleteById(String id) { - String resourceGroupName = 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, "schedules"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = 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, "schedules"); - if (name == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'schedules'.", id))); - } - this.delete(resourceGroupName, workspaceName, name, context); - } - - private SchedulesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - public ScheduleImpl define(String name) { - return new ScheduleImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java deleted file mode 100644 index 122efdee34ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/SkuResourceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResource; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; - -public final class SkuResourceImpl implements SkuResource { - private SkuResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - SkuResourceImpl( - SkuResourceInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public 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 908490a7694d..000000000000 --- 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 393fe54fa983..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsageImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.Usage; -import com.azure.resourcemanager.machinelearning.models.UsageName; -import com.azure.resourcemanager.machinelearning.models.UsageUnit; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - UsageImpl(UsageInner innerObject, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String amlWorkspaceLocation() { - return this.innerModel().amlWorkspaceLocation(); - } - - public String type() { - return this.innerModel().type(); - } - - public UsageUnit unit() { - return this.innerModel().unit(); - } - - public Long currentValue() { - return this.innerModel().currentValue(); - } - - public Long limit() { - return this.innerModel().limit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java deleted file mode 100644 index ec1dff04b47b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in UsagesClient. */ -public final class UsagesClientImpl implements UsagesClient { - /** The proxy service used to perform REST calls. */ - private final UsagesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesUsages to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface UsagesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - location, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets the current usage information as well as limits for AML resources for given subscription and location. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as limits for AML resources for given subscription and location as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 b70b59b57e69..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/UsagesImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.UsagesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; -import com.azure.resourcemanager.machinelearning.models.Usage; -import com.azure.resourcemanager.machinelearning.models.Usages; - -public final class UsagesImpl implements Usages { - private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public UsagesImpl( - UsagesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return 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 7ca689e769ae..000000000000 --- 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 92771d638a0b..000000000000 --- 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 862150234bac..000000000000 --- 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") - public interface VirtualMachineSizesService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - location, - this.client.getApiVersion(), - this.client.getSubscriptionId(), - accept, - context); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String location) { - return listWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String location, Context context) { - return listWithResponseAsync(location, context).block(); - } - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public VirtualMachineSizeListResultInner list(String location) { - return listWithResponse(location, Context.NONE).getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/VirtualMachineSizesImpl.java deleted file mode 100644 index eeec5b0fbd76..000000000000 --- 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 Response listWithResponse(String location, Context context) { - Response inner = this.serviceClient().listWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new VirtualMachineSizeListResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public VirtualMachineSizeListResult list(String location) { - VirtualMachineSizeListResultInner inner = this.serviceClient().list(location); - if (inner != null) { - return new VirtualMachineSizeListResultImpl(inner, this.manager()); - } else { - return null; - } - } - - private VirtualMachineSizesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.java deleted file mode 100644 index 9ff113b0e7ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionPropertiesV2BasicResourceImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; - -public final class WorkspaceConnectionPropertiesV2BasicResourceImpl - implements WorkspaceConnectionPropertiesV2BasicResource, WorkspaceConnectionPropertiesV2BasicResource.Definition { - private WorkspaceConnectionPropertiesV2BasicResourceInner innerObject; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - WorkspaceConnectionPropertiesV2BasicResourceImpl( - WorkspaceConnectionPropertiesV2BasicResourceInner innerObject, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public WorkspaceConnectionPropertiesV2 properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public WorkspaceConnectionPropertiesV2BasicResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.machinelearning.MachineLearningManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String workspaceName; - - private String connectionName; - - public WorkspaceConnectionPropertiesV2BasicResourceImpl withExistingWorkspace( - String resourceGroupName, String workspaceName) { - this.resourceGroupName = resourceGroupName; - this.workspaceName = workspaceName; - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .createWithResponse(resourceGroupName, workspaceName, connectionName, this.innerModel(), context) - .getValue(); - return this; - } - - WorkspaceConnectionPropertiesV2BasicResourceImpl( - String name, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerObject = new WorkspaceConnectionPropertiesV2BasicResourceInner(); - this.serviceManager = serviceManager; - this.connectionName = name; - } - - public WorkspaceConnectionPropertiesV2BasicResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE) - .getValue(); - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResource refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getWorkspaceConnections() - .getWithResponse(resourceGroupName, workspaceName, connectionName, context) - .getValue(); - return this; - } - - public WorkspaceConnectionPropertiesV2BasicResourceImpl withProperties(WorkspaceConnectionPropertiesV2 properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java deleted file mode 100644 index 2b07717ee35e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsClientImpl.java +++ /dev/null @@ -1,935 +0,0 @@ -// Copyright (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.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspaceConnectionsClient. */ -public final class WorkspaceConnectionsClientImpl implements WorkspaceConnectionsClient { - /** The proxy service used to perform REST calls. */ - private final WorkspaceConnectionsService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceConnectionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceConnectionsClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy - .create(WorkspaceConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceConnections to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspaceConnectionsService { - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}") - @ExpectedResponses({200, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @PathParam("connectionName") String connectionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("target") String target, - @QueryParam("category") String category, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .create( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createAsync( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createWithResponse( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters, - Context context) { - return createWithResponseAsync(resourceGroupName, workspaceName, connectionName, parameters, context).block(); - } - - /** - * The create operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param parameters The object for creating or updating a new workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner create( - String resourceGroupName, - String workspaceName, - String connectionName, - WorkspaceConnectionPropertiesV2BasicResourceInner parameters) { - return createWithResponse(resourceGroupName, workspaceName, connectionName, parameters, Context.NONE) - .getValue(); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceConnectionPropertiesV2BasicResourceInner get( - String resourceGroupName, String workspaceName, String connectionName) { - return getWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE).getValue(); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - connectionName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String workspaceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, connectionName, context).block(); - } - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - deleteWithResponse(resourceGroupName, workspaceName, connectionName, Context.NONE); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - target, - category, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - target, - category, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, target, category, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName) { - final String target = null; - final String category = null; - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category)); - } - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, target, category, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

The nextLink parameter. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.java deleted file mode 100644 index ba28d102dd9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceConnectionsImpl.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.WorkspaceConnectionsClient; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnections; - -public final class WorkspaceConnectionsImpl implements WorkspaceConnections { - private static final ClientLogger LOGGER = new ClientLogger(WorkspaceConnectionsImpl.class); - - private final WorkspaceConnectionsClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public WorkspaceConnectionsImpl( - WorkspaceConnectionsClient innerClient, - com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, workspaceName, connectionName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkspaceConnectionPropertiesV2BasicResource get( - String resourceGroupName, String workspaceName, String connectionName) { - WorkspaceConnectionPropertiesV2BasicResourceInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, connectionName); - if (inner != null) { - return new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, connectionName, context); - } - - public void delete(String resourceGroupName, String workspaceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, workspaceName, connectionName); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName); - return Utils - .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); - } - - public PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, workspaceName, target, category, context); - return Utils - .mapPage(inner, inner1 -> new WorkspaceConnectionPropertiesV2BasicResourceImpl(inner1, this.manager())); - } - - public WorkspaceConnectionPropertiesV2BasicResource 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 WorkspaceConnectionPropertiesV2BasicResourceImpl define(String name) { - return new WorkspaceConnectionPropertiesV2BasicResourceImpl(name, this.manager()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java deleted file mode 100644 index 46e72e570fe9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceFeaturesClientImpl.java +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.machinelearning.fluent.WorkspaceFeaturesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspaceFeaturesClient. */ -public final class WorkspaceFeaturesClientImpl implements WorkspaceFeaturesClient { - /** The proxy service used to perform REST calls. */ - private final WorkspaceFeaturesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspaceFeaturesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspaceFeaturesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(WorkspaceFeaturesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaceFeatures to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspaceFeaturesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String workspaceName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, workspaceName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName)); - } - - /** - * Lists all enabled features for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Aml user feature operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String workspaceName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, workspaceName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 875e67abbaff..000000000000 --- 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 5a2da698968a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspaceImpl.java +++ /dev/null @@ -1,528 +0,0 @@ -// Copyright (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 Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); - } - - 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() { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName); - } - - public DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context) { - return serviceManager.workspaces().diagnose(resourceGroupName, workspaceName, parameters, context); - } - - public Response listKeysWithResponse(Context context) { - return serviceManager.workspaces().listKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListWorkspaceKeysResult listKeys() { - return serviceManager.workspaces().listKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys() { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(Context context) { - serviceManager.workspaces().resyncKeys(resourceGroupName, workspaceName, context); - } - - public Response listNotebookAccessTokenWithResponse(Context context) { - return serviceManager - .workspaces() - .listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - } - - public NotebookAccessTokenResult listNotebookAccessToken() { - return serviceManager.workspaces().listNotebookAccessToken(resourceGroupName, workspaceName); - } - - public NotebookResourceInfo prepareNotebook() { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName); - } - - public NotebookResourceInfo prepareNotebook(Context context) { - return serviceManager.workspaces().prepareNotebook(resourceGroupName, workspaceName, context); - } - - public Response listStorageAccountKeysWithResponse(Context context) { - return serviceManager - .workspaces() - .listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListStorageAccountKeysResult listStorageAccountKeys() { - return serviceManager.workspaces().listStorageAccountKeys(resourceGroupName, workspaceName); - } - - public Response listNotebookKeysWithResponse(Context context) { - return serviceManager.workspaces().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - } - - public ListNotebookKeysResult listNotebookKeys() { - return serviceManager.workspaces().listNotebookKeys(resourceGroupName, workspaceName); - } - - public WorkspaceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public WorkspaceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public WorkspaceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateParameters.withTags(tags); - return this; - } - } - - public WorkspaceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateParameters.withIdentity(identity); - return this; - } - } - - public WorkspaceImpl 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; - } - } - - public WorkspaceImpl withV1LegacyMode(Boolean v1LegacyMode) { - this.innerModel().withV1LegacyMode(v1LegacyMode); - 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 e097ac2af75b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacePropertiesImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.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 Boolean v1LegacyMode() { - return this.innerModel().v1LegacyMode(); - } - - 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 31d06417842a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesClientImpl.java +++ /dev/null @@ -1,3245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.WorkspaceListResult; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** An instance of this class provides access to all the operations defined in WorkspacesClient. */ -public final class WorkspacesClientImpl implements WorkspacesClient { - /** The proxy service used to perform REST calls. */ - private final WorkspacesService service; - - /** The service client containing this operation class. */ - private final AzureMachineLearningWorkspacesImpl client; - - /** - * Initializes an instance of WorkspacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - WorkspacesClientImpl(AzureMachineLearningWorkspacesImpl client) { - this.service = - RestProxy.create(WorkspacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for AzureMachineLearningWorkspacesWorkspaces to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "AzureMachineLearning") - public interface WorkspacesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceInner parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202, 204}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @BodyParam("application/json") WorkspaceUpdateParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> diagnose( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DiagnoseWorkspaceParameters parameters, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resyncKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("$skip") String skip, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookAccessToken( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook") - @ExpectedResponses({200, 202}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> prepareNotebook( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listStorageAccountKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNotebookKeys( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" - + "/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listOutboundNetworkDependenciesEndpoints( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("workspaceName") String workspaceName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get("{nextLink}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - parameters, - accept, - context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - WorkspaceInner.class, - WorkspaceInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, WorkspaceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), WorkspaceInner.class, WorkspaceInner.class, context); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginCreateOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Creates or updates a workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for creating or updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner createOrUpdate( - String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if 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 this.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 this.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 this.beginUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, WorkspaceInner> beginUpdate( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return this.beginUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Updates a machine learning workspace with the specified parameters. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameters for updating a machine learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an object that represents a machine learning workspace. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner update( - String resourceGroupName, String workspaceName, WorkspaceUpdateParameters parameters, Context context) { - return updateAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - final String skip = null; - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String skip, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, skip, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - final String skip = null; - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String skip, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, skip, context)); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .diagnose( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - parameters, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> diagnoseWithResponseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .diagnose( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - parameters, - accept, - context); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - this.client.getContext()); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - Mono>> mono = diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - this.client.getContext()); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DiagnoseResponseResultInner> beginDiagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - diagnoseWithResponseAsync(resourceGroupName, workspaceName, parameters, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - DiagnoseResponseResultInner.class, - DiagnoseResponseResultInner.class, - context); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DiagnoseResponseResultInner> beginDiagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return this.beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono diagnoseAsync( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return beginDiagnoseAsync(resourceGroupName, workspaceName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose(String resourceGroupName, String workspaceName) { - final DiagnoseWorkspaceParameters parameters = null; - return diagnoseAsync(resourceGroupName, workspaceName, parameters).block(); - } - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnoseResponseResultInner diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - return diagnoseAsync(resourceGroupName, workspaceName, parameters, context).block(); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listKeysAsync(String resourceGroupName, String workspaceName) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListWorkspaceKeysResultInner listKeys(String resourceGroupName, String workspaceName) { - return listKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .resyncKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resyncKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .resyncKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync(String resourceGroupName, String workspaceName) { - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginResyncKeysAsync( - String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resyncKeysWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys(String resourceGroupName, String workspaceName) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginResyncKeys( - String resourceGroupName, String workspaceName, Context context) { - return this.beginResyncKeysAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName) { - return beginResyncKeysAsync(resourceGroupName, workspaceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resyncKeysAsync(String resourceGroupName, String workspaceName, Context context) { - return beginResyncKeysAsync(resourceGroupName, workspaceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName) { - resyncKeysAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - resyncKeysAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - skip, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String skip, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - skip, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip) { - return new PagedFlux<>( - () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String skip = null; - return new PagedFlux<>( - () -> listSinglePageAsync(skip), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String skip, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(skip, context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String skip = null; - return new PagedIterable<>(listAsync(skip)); - } - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String skip, Context context) { - return new PagedIterable<>(listAsync(skip, context)); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookAccessTokenWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listNotebookAccessToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookAccessTokenWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNotebookAccessToken( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookAccessTokenAsync( - String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listNotebookAccessTokenWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookAccessTokenResultInner listNotebookAccessToken(String resourceGroupName, String workspaceName) { - return listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .prepareNotebook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> prepareNotebookWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .prepareNotebook( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> beginPrepareNotebookAsync( - String resourceGroupName, String workspaceName) { - Mono>> mono = prepareNotebookWithResponseAsync(resourceGroupName, workspaceName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - this.client.getContext()); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, NotebookResourceInfoInner> beginPrepareNotebookAsync( - String resourceGroupName, String workspaceName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = - prepareNotebookWithResponseAsync(resourceGroupName, workspaceName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - NotebookResourceInfoInner.class, - NotebookResourceInfoInner.class, - context); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName).getSyncPoller(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, NotebookResourceInfoInner> beginPrepareNotebook( - String resourceGroupName, String workspaceName, Context context) { - return this.beginPrepareNotebookAsync(resourceGroupName, workspaceName, context).getSyncPoller(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync(String resourceGroupName, String workspaceName) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono prepareNotebookAsync( - String resourceGroupName, String workspaceName, Context context) { - return beginPrepareNotebookAsync(resourceGroupName, workspaceName, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName) { - return prepareNotebookAsync(resourceGroupName, workspaceName).block(); - } - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public NotebookResourceInfoInner prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - return prepareNotebookAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStorageAccountKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listStorageAccountKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listStorageAccountKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listStorageAccountKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listStorageAccountKeysAsync( - String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listStorageAccountKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListStorageAccountKeysResultInner listStorageAccountKeys(String resourceGroupName, String workspaceName) { - return listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listNotebookKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNotebookKeysWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listNotebookKeys( - this.client.getEndpoint(), - this.client.getApiVersion(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - accept, - context); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listNotebookKeysAsync(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listNotebookKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); - } - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ListNotebookKeysResultInner listNotebookKeys(String resourceGroupName, String workspaceName) { - return listNotebookKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - String resourceGroupName, String workspaceName) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> - service - .listOutboundNetworkDependenciesEndpoints( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listOutboundNetworkDependenciesEndpointsWithResponseAsync( - String resourceGroupName, String workspaceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (workspaceName == null) { - return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listOutboundNetworkDependenciesEndpoints( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - workspaceName, - this.client.getApiVersion(), - accept, - context); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listOutboundNetworkDependenciesEndpointsAsync( - String resourceGroupName, String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listOutboundNetworkDependenciesEndpointsWithResponseAsync(resourceGroupName, workspaceName, context) - .block(); - } - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ExternalFqdnResponseInner listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - return listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items - *

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 URL to get the next list of items - *

The nextLink parameter. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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 75bd16e0e657..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/WorkspacesImpl.java +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.machinelearning.fluent.WorkspacesClient; -import com.azure.resourcemanager.machinelearning.fluent.models.DiagnoseResponseResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListNotebookKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListStorageAccountKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.ListWorkspaceKeysResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookAccessTokenResultInner; -import com.azure.resourcemanager.machinelearning.fluent.models.NotebookResourceInfoInner; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceInner; -import com.azure.resourcemanager.machinelearning.models.DiagnoseResponseResult; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import com.azure.resourcemanager.machinelearning.models.ListNotebookKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListStorageAccountKeysResult; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceKeysResult; -import com.azure.resourcemanager.machinelearning.models.NotebookAccessTokenResult; -import com.azure.resourcemanager.machinelearning.models.NotebookResourceInfo; -import com.azure.resourcemanager.machinelearning.models.Workspace; -import com.azure.resourcemanager.machinelearning.models.Workspaces; - -public final class WorkspacesImpl implements Workspaces { - private static final ClientLogger LOGGER = new ClientLogger(WorkspacesImpl.class); - - private final WorkspacesClient innerClient; - - private final com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager; - - public WorkspacesImpl( - WorkspacesClient innerClient, com.azure.resourcemanager.machinelearning.MachineLearningManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new WorkspaceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void 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) { - DiagnoseResponseResultInner inner = this.serviceClient().diagnose(resourceGroupName, workspaceName); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context) { - DiagnoseResponseResultInner inner = - this.serviceClient().diagnose(resourceGroupName, workspaceName, parameters, context); - if (inner != null) { - return new DiagnoseResponseResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListWorkspaceKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName) { - ListWorkspaceKeysResultInner inner = this.serviceClient().listKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListWorkspaceKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public void resyncKeys(String resourceGroupName, String workspaceName) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName); - } - - public void resyncKeys(String resourceGroupName, String workspaceName, Context context) { - this.serviceClient().resyncKeys(resourceGroupName, workspaceName, context); - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return 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 Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listNotebookAccessTokenWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new NotebookAccessTokenResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName) { - NotebookAccessTokenResultInner inner = - this.serviceClient().listNotebookAccessToken(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookAccessTokenResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName) { - NotebookResourceInfoInner inner = this.serviceClient().prepareNotebook(resourceGroupName, workspaceName); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context) { - NotebookResourceInfoInner inner = - this.serviceClient().prepareNotebook(resourceGroupName, workspaceName, context); - if (inner != null) { - return new NotebookResourceInfoImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listStorageAccountKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListStorageAccountKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName) { - ListStorageAccountKeysResultInner inner = - this.serviceClient().listStorageAccountKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListStorageAccountKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this.serviceClient().listNotebookKeysWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ListNotebookKeysResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName) { - ListNotebookKeysResultInner inner = this.serviceClient().listNotebookKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new ListNotebookKeysResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context) { - Response inner = - this - .serviceClient() - .listOutboundNetworkDependenciesEndpointsWithResponse(resourceGroupName, workspaceName, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new ExternalFqdnResponseImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints( - String resourceGroupName, String workspaceName) { - ExternalFqdnResponseInner inner = - this.serviceClient().listOutboundNetworkDependenciesEndpoints(resourceGroupName, workspaceName); - if (inner != null) { - return new ExternalFqdnResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public Workspace getById(String id) { - String resourceGroupName = 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 d69c58716f98..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/implementation/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for AzureMachineLearningWorkspaces. These APIs allow end users to operate on - * Azure Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.implementation; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.java deleted file mode 100644 index 3a914e9d9308..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreCredentials.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; - -/** 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; - - /** Creates an instance of AccountKeyDatastoreCredentials class. */ - public AccountKeyDatastoreCredentials() { - } - - /** - * 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 8f18b266e3a9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AccountKeyDatastoreSecrets.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.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; - - /** Creates an instance of AccountKeyDatastoreSecrets class. */ - public AccountKeyDatastoreSecrets() { - } - - /** - * 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 e1f8238bd92c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Aks.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of Aks class. */ - public Aks() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public Aks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 048c5141075b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecrets.java +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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; - - /** Creates an instance of AksComputeSecrets class. */ - public AksComputeSecrets() { - } - - /** - * 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 caf711390f87..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksComputeSecretsProperties.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of AksComputeSecretsProperties class. */ - public AksComputeSecretsProperties() { - } - - /** - * Get the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the userKubeConfig value. - */ - public String userKubeConfig() { - return this.userKubeConfig; - } - - /** - * Set the userKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param userKubeConfig the userKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withUserKubeConfig(String userKubeConfig) { - this.userKubeConfig = userKubeConfig; - return this; - } - - /** - * Get the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @return the adminKubeConfig value. - */ - public String adminKubeConfig() { - return this.adminKubeConfig; - } - - /** - * Set the adminKubeConfig property: Content of kubeconfig file that can be used to connect to the Kubernetes - * cluster. - * - * @param adminKubeConfig the adminKubeConfig value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withAdminKubeConfig(String adminKubeConfig) { - this.adminKubeConfig = adminKubeConfig; - return this; - } - - /** - * Get the imagePullSecretName property: Image registry pull secret. - * - * @return the imagePullSecretName value. - */ - public String imagePullSecretName() { - return this.imagePullSecretName; - } - - /** - * Set the imagePullSecretName property: Image registry pull secret. - * - * @param imagePullSecretName the imagePullSecretName value to set. - * @return the AksComputeSecretsProperties object itself. - */ - public AksComputeSecretsProperties withImagePullSecretName(String imagePullSecretName) { - this.imagePullSecretName = imagePullSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 a66653a00d7d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksNetworkingConfiguration.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; - -/** 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; - - /** Creates an instance of AksNetworkingConfiguration class. */ - public AksNetworkingConfiguration() { - } - - /** - * Get the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnetId value. - */ - public String subnetId() { - return this.subnetId; - } - - /** - * Set the subnetId property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnetId the subnetId value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withSubnetId(String subnetId) { - this.subnetId = subnetId; - return this; - } - - /** - * Get the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @return the serviceCidr value. - */ - public String serviceCidr() { - return this.serviceCidr; - } - - /** - * Set the serviceCidr property: A CIDR notation IP range from which to assign service cluster IPs. It must not - * overlap with any Subnet IP ranges. - * - * @param serviceCidr the serviceCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withServiceCidr(String serviceCidr) { - this.serviceCidr = serviceCidr; - return this; - } - - /** - * Get the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @return the dnsServiceIp value. - */ - public String dnsServiceIp() { - return this.dnsServiceIp; - } - - /** - * Set the dnsServiceIp property: An IP address assigned to the Kubernetes DNS service. It must be within the - * Kubernetes service address range specified in serviceCidr. - * - * @param dnsServiceIp the dnsServiceIp value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDnsServiceIp(String dnsServiceIp) { - this.dnsServiceIp = dnsServiceIp; - return this; - } - - /** - * Get the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @return the dockerBridgeCidr value. - */ - public String dockerBridgeCidr() { - return this.dockerBridgeCidr; - } - - /** - * Set the dockerBridgeCidr property: A CIDR notation IP range assigned to the Docker bridge network. It must not - * overlap with any Subnet IP ranges or the Kubernetes service address range. - * - * @param dockerBridgeCidr the dockerBridgeCidr value to set. - * @return the AksNetworkingConfiguration object itself. - */ - public AksNetworkingConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { - this.dockerBridgeCidr = dockerBridgeCidr; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 892c30daeece..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The AksSchema model. */ -@Fluent -public class AksSchema { - /* - * AKS properties - */ - @JsonProperty(value = "properties") - private AksSchemaProperties properties; - - /** Creates an instance of AksSchema class. */ - public AksSchema() { - } - - /** - * Get the properties property: AKS properties. - * - * @return the properties value. - */ - public AksSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: AKS properties. - * - * @param properties the properties value to set. - * @return the AksSchema object itself. - */ - public AksSchema withProperties(AksSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 abef14024d16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AksSchemaProperties.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 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; - - /** Creates an instance of AksSchemaProperties class. */ - public AksSchemaProperties() { - } - - /** - * Get the clusterFqdn property: Cluster full qualified domain name. - * - * @return the clusterFqdn value. - */ - public String clusterFqdn() { - return this.clusterFqdn; - } - - /** - * Set the clusterFqdn property: Cluster full qualified domain name. - * - * @param clusterFqdn the clusterFqdn value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withClusterFqdn(String clusterFqdn) { - this.clusterFqdn = clusterFqdn; - return this; - } - - /** - * Get the systemServices property: System services. - * - * @return the systemServices value. - */ - public List systemServices() { - return this.systemServices; - } - - /** - * Get the agentCount property: Number of agents. - * - * @return the agentCount value. - */ - public Integer agentCount() { - return this.agentCount; - } - - /** - * Set the agentCount property: Number of agents. - * - * @param agentCount the agentCount value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAgentCount(Integer agentCount) { - this.agentCount = agentCount; - return this; - } - - /** - * Get the agentVmSize property: Agent virtual machine size. - * - * @return the agentVmSize value. - */ - public String agentVmSize() { - return this.agentVmSize; - } - - /** - * Set the agentVmSize property: Agent virtual machine size. - * - * @param agentVmSize the agentVmSize value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAgentVmSize(String agentVmSize) { - this.agentVmSize = agentVmSize; - return this; - } - - /** - * Get the clusterPurpose property: Intended usage of the cluster. - * - * @return the clusterPurpose value. - */ - public ClusterPurpose clusterPurpose() { - return this.clusterPurpose; - } - - /** - * Set the clusterPurpose property: Intended usage of the cluster. - * - * @param clusterPurpose the clusterPurpose value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withClusterPurpose(ClusterPurpose clusterPurpose) { - this.clusterPurpose = clusterPurpose; - return this; - } - - /** - * Get the sslConfiguration property: SSL configuration. - * - * @return the sslConfiguration value. - */ - public SslConfiguration sslConfiguration() { - return this.sslConfiguration; - } - - /** - * Set the sslConfiguration property: SSL configuration. - * - * @param sslConfiguration the sslConfiguration value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withSslConfiguration(SslConfiguration sslConfiguration) { - this.sslConfiguration = sslConfiguration; - return this; - } - - /** - * Get the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @return the aksNetworkingConfiguration value. - */ - public AksNetworkingConfiguration aksNetworkingConfiguration() { - return this.aksNetworkingConfiguration; - } - - /** - * Set the aksNetworkingConfiguration property: AKS networking configuration for vnet. - * - * @param aksNetworkingConfiguration the aksNetworkingConfiguration value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withAksNetworkingConfiguration(AksNetworkingConfiguration aksNetworkingConfiguration) { - this.aksNetworkingConfiguration = aksNetworkingConfiguration; - return this; - } - - /** - * Get the loadBalancerType property: Load Balancer Type. - * - * @return the loadBalancerType value. - */ - public LoadBalancerType loadBalancerType() { - return this.loadBalancerType; - } - - /** - * Set the loadBalancerType property: Load Balancer Type. - * - * @param loadBalancerType the loadBalancerType value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withLoadBalancerType(LoadBalancerType loadBalancerType) { - this.loadBalancerType = loadBalancerType; - return this; - } - - /** - * Get the loadBalancerSubnet property: Load Balancer Subnet. - * - * @return the loadBalancerSubnet value. - */ - public String loadBalancerSubnet() { - return this.loadBalancerSubnet; - } - - /** - * Set the loadBalancerSubnet property: Load Balancer Subnet. - * - * @param loadBalancerSubnet the loadBalancerSubnet value to set. - * @return the AksSchemaProperties object itself. - */ - public AksSchemaProperties withLoadBalancerSubnet(String loadBalancerSubnet) { - this.loadBalancerSubnet = loadBalancerSubnet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (systemServices() != null) { - systemServices().forEach(e -> e.validate()); - } - if (sslConfiguration() != null) { - sslConfiguration().validate(); - } - if (aksNetworkingConfiguration() != null) { - aksNetworkingConfiguration().validate(); - } - } -} 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 d3450dd2ccfb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AllocationState.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Allocation state. - * - *

Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There - * are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is - * created and when no operations are being performed on the compute to change the number of compute nodes. resizing - - * Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute. - */ -public final class AllocationState extends ExpandableStringEnum { - /** Static value Steady for AllocationState. */ - public static final AllocationState STEADY = fromString("Steady"); - - /** Static value Resizing for AllocationState. */ - public static final AllocationState RESIZING = fromString("Resizing"); - - /** - * Creates a new instance of AllocationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AllocationState() { - } - - /** - * Creates or finds a AllocationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllocationState. - */ - @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 e066172a41ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlCompute.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of AmlCompute class. */ - public AmlCompute() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public AmlCompute withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 fb5d1b5c24bb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodeInformation.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of AmlComputeNodeInformation class. */ - public AmlComputeNodeInformation() { - } - - /** - * 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 66e875ffc3cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeNodesInformation.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.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; - - /** Creates an instance of AmlComputeNodesInformation class. */ - public AmlComputeNodesInformation() { - } - - /** - * Get the nodes property: The collection of returned AmlCompute nodes details. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Get the nextLink property: The continuation token. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - } -} 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 7168c72acc8d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeProperties.java +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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.time.OffsetDateTime; -import java.util.List; - -/** 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") - private Object propertyBag; - - /** Creates an instance of AmlComputeProperties class. */ - public AmlComputeProperties() { - } - - /** - * Get the osType property: Compute OS Type. - * - * @return the osType value. - */ - public OsType osType() { - return this.osType; - } - - /** - * Set the osType property: Compute OS Type. - * - * @param osType the osType value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withOsType(OsType osType) { - this.osType = osType; - return this; - } - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the vmPriority property: Virtual Machine priority. - * - * @return the vmPriority value. - */ - public VmPriority vmPriority() { - return this.vmPriority; - } - - /** - * Set the vmPriority property: Virtual Machine priority. - * - * @param vmPriority the vmPriority value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVmPriority(VmPriority vmPriority) { - this.vmPriority = vmPriority; - return this; - } - - /** - * Get the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @return the virtualMachineImage value. - */ - public VirtualMachineImage virtualMachineImage() { - return this.virtualMachineImage; - } - - /** - * Set the virtualMachineImage property: Virtual Machine image for AML Compute - windows only. - * - * @param virtualMachineImage the virtualMachineImage value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withVirtualMachineImage(VirtualMachineImage virtualMachineImage) { - this.virtualMachineImage = virtualMachineImage; - return this; - } - - /** - * Get the isolatedNetwork property: Network is isolated or not. - * - * @return the isolatedNetwork value. - */ - public Boolean isolatedNetwork() { - return this.isolatedNetwork; - } - - /** - * Set the isolatedNetwork property: Network is isolated or not. - * - * @param isolatedNetwork the isolatedNetwork value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withIsolatedNetwork(Boolean isolatedNetwork) { - this.isolatedNetwork = isolatedNetwork; - return this; - } - - /** - * Get the scaleSettings property: Scale settings for AML Compute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: Scale settings for AML Compute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Get the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @return the userAccountCredentials value. - */ - public UserAccountCredentials userAccountCredentials() { - return this.userAccountCredentials; - } - - /** - * Set the userAccountCredentials property: Credentials for an administrator user account that will be created on - * each compute node. - * - * @param userAccountCredentials the userAccountCredentials value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withUserAccountCredentials(UserAccountCredentials userAccountCredentials) { - this.userAccountCredentials = userAccountCredentials; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the remoteLoginPortPublicAccess property: 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 Object propertyBag() { - return this.propertyBag; - } - - /** - * Set the propertyBag property: A property bag containing additional properties. - * - * @param propertyBag the propertyBag value to set. - * @return the AmlComputeProperties object itself. - */ - public AmlComputeProperties withPropertyBag(Object propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (virtualMachineImage() != null) { - virtualMachineImage().validate(); - } - if (scaleSettings() != null) { - scaleSettings().validate(); - } - if (userAccountCredentials() != null) { - userAccountCredentials().validate(); - } - if (subnet() != null) { - subnet().validate(); - } - if (nodeStateCounts() != null) { - nodeStateCounts().validate(); - } - } -} 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 d1c4ec002bad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlComputeSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** Properties(top level) of AmlCompute. */ -@Fluent -public class AmlComputeSchema { - /* - * Properties of AmlCompute - */ - @JsonProperty(value = "properties") - private AmlComputeProperties properties; - - /** Creates an instance of AmlComputeSchema class. */ - public AmlComputeSchema() { - } - - /** - * Get the properties property: Properties of AmlCompute. - * - * @return the properties value. - */ - public AmlComputeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of AmlCompute. - * - * @param properties the properties value to set. - * @return the AmlComputeSchema object itself. - */ - public AmlComputeSchema withProperties(AmlComputeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 89261a24cb42..000000000000 --- 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 2bf229e370c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationDisplay.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of AmlOperationDisplay class. */ - public AmlOperationDisplay() { - } - - /** - * 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 49d6cbce0d99..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlOperationListResult.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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; - - /** Creates an instance of AmlOperationListResult class. */ - public AmlOperationListResult() { - } - - /** - * 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 03fbe387d4c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AmlToken.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.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 { - /** Creates an instance of AmlToken class. */ - public AmlToken() { - } - - /** - * 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 8fa6accfeb21..000000000000 --- 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 a653e0e15096..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ApplicationSharingPolicy.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; - -/** - * Sharing policy for applications on this compute instance - * - *

Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the - * creator can access applications on this compute instance. When Shared, any workspace user can access applications on - * this instance depending on his/her assigned role. - */ -public final class ApplicationSharingPolicy extends ExpandableStringEnum { - /** Static value Personal for ApplicationSharingPolicy. */ - public static final ApplicationSharingPolicy PERSONAL = fromString("Personal"); - - /** Static value Shared for ApplicationSharingPolicy. */ - public static final ApplicationSharingPolicy SHARED = fromString("Shared"); - - /** - * Creates a new instance of ApplicationSharingPolicy value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ApplicationSharingPolicy() { - } - - /** - * Creates or finds a ApplicationSharingPolicy from its string representation. - * - * @param name a name to look for. - * @return the corresponding ApplicationSharingPolicy. - */ - @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 603e689cf5fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetBase.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 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; - - /** Creates an instance of AssetBase class. */ - public AssetBase() { - } - - /** - * 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 6c5d657f3ba6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetContainer.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; -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; - - /** Creates an instance of AssetContainer class. */ - public AssetContainer() { - } - - /** - * Get the isArchived property: Is the asset archived?. - * - * @return the isArchived value. - */ - public Boolean isArchived() { - return this.isArchived; - } - - /** - * Set the isArchived property: Is the asset archived?. - * - * @param isArchived the isArchived value to set. - * @return the AssetContainer object itself. - */ - public AssetContainer withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the latestVersion property: The latest version inside this container. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * 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 afeecb043691..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobInput.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; - -/** 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; - - /** Creates an instance of AssetJobInput class. */ - public AssetJobInput() { - } - - /** - * 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 e6c3f9463eab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetJobOutput.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; - -/** 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; - - /** Creates an instance of AssetJobOutput class. */ - public AssetJobOutput() { - } - - /** - * 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 e19aef73ced2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssetReferenceBase.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 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 { - /** Creates an instance of AssetReferenceBase class. */ - public 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 722668be4109..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AssignedUser.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.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; - - /** Creates an instance of AssignedUser class. */ - public AssignedUser() { - } - - /** - * Get the objectId property: User’s AAD Object Id. - * - * @return the objectId value. - */ - public String objectId() { - return this.objectId; - } - - /** - * Set the objectId property: User’s AAD Object Id. - * - * @param objectId the objectId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withObjectId(String objectId) { - this.objectId = objectId; - return this; - } - - /** - * Get the tenantId property: User’s AAD Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: User’s AAD Tenant Id. - * - * @param tenantId the tenantId value to set. - * @return the AssignedUser object itself. - */ - public AssignedUser withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (objectId() == null) { - throw LOGGER - .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 bafe88b21f84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoForecastHorizon.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.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 { - /** Creates an instance of AutoForecastHorizon class. */ - public AutoForecastHorizon() { - } - - /** - * 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 a9118767dc85..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLJob.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.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 JobBaseProperties { - /* - * 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 JobResourceConfiguration resources; - - /* - * [Required] This represents scenario which can be one of Tables/NLP/Image - */ - @JsonProperty(value = "taskDetails", required = true) - private AutoMLVertical taskDetails; - - /** Creates an instance of AutoMLJob class. */ - public AutoMLJob() { - } - - /** - * 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 JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the AutoMLJob object itself. - */ - public AutoMLJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the 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 withComponentId(String componentId) { - super.withComponentId(componentId); - 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 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 827fdba1ef48..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoMLVertical.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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; - - /* - * Target column name: This is prediction values column. - * Also known as label column name in context of classification tasks. - */ - @JsonProperty(value = "targetColumnName") - private String targetColumnName; - - /* - * [Required] Training data input. - */ - @JsonProperty(value = "trainingData", required = true) - private MLTableJobInput trainingData; - - /** Creates an instance of AutoMLVertical class. */ - public AutoMLVertical() { - } - - /** - * Get the logVerbosity property: Log verbosity for the job. - * - * @return the logVerbosity value. - */ - public LogVerbosity logVerbosity() { - return this.logVerbosity; - } - - /** - * Set the logVerbosity property: Log verbosity for the job. - * - * @param logVerbosity the logVerbosity value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withLogVerbosity(LogVerbosity logVerbosity) { - this.logVerbosity = logVerbosity; - return this; - } - - /** - * Get the targetColumnName property: Target column name: This is prediction values column. Also known as label - * column name in context of classification tasks. - * - * @return the targetColumnName value. - */ - public String targetColumnName() { - return this.targetColumnName; - } - - /** - * Set the targetColumnName property: Target column name: This is prediction values column. Also known as label - * column name in context of classification tasks. - * - * @param targetColumnName the targetColumnName value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withTargetColumnName(String targetColumnName) { - this.targetColumnName = targetColumnName; - return this; - } - - /** - * Get the trainingData property: [Required] Training data input. - * - * @return the trainingData value. - */ - public MLTableJobInput trainingData() { - return this.trainingData; - } - - /** - * Set the trainingData property: [Required] Training data input. - * - * @param trainingData the trainingData value to set. - * @return the AutoMLVertical object itself. - */ - public AutoMLVertical withTrainingData(MLTableJobInput trainingData) { - this.trainingData = trainingData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (trainingData() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trainingData in model AutoMLVertical")); - } else { - trainingData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AutoMLVertical.class); -} 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 28b2d6e00151..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoNCrossValidations.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.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 { - /** Creates an instance of AutoNCrossValidations class. */ - public AutoNCrossValidations() { - } - - /** - * 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 668bfa415df0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoPauseProperties.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; - -/** 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; - - /** Creates an instance of AutoPauseProperties class. */ - public AutoPauseProperties() { - } - - /** - * Get the delayInMinutes property: The delayInMinutes property. - * - * @return the delayInMinutes value. - */ - public Integer delayInMinutes() { - return this.delayInMinutes; - } - - /** - * Set the delayInMinutes property: The delayInMinutes property. - * - * @param delayInMinutes the delayInMinutes value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withDelayInMinutes(Integer delayInMinutes) { - this.delayInMinutes = delayInMinutes; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoPauseProperties object itself. - */ - public AutoPauseProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.java deleted file mode 100644 index d22d8e77ba60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoRebuildSetting.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; - -/** AutoRebuild setting for the derived image. */ -public final class AutoRebuildSetting extends ExpandableStringEnum { - /** Static value Disabled for AutoRebuildSetting. */ - public static final AutoRebuildSetting DISABLED = fromString("Disabled"); - - /** Static value OnBaseImageUpdate for AutoRebuildSetting. */ - public static final AutoRebuildSetting ON_BASE_IMAGE_UPDATE = fromString("OnBaseImageUpdate"); - - /** - * Creates a new instance of AutoRebuildSetting value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AutoRebuildSetting() { - } - - /** - * Creates or finds a AutoRebuildSetting from its string representation. - * - * @param name a name to look for. - * @return the corresponding AutoRebuildSetting. - */ - @JsonCreator - public static AutoRebuildSetting fromString(String name) { - return fromString(name, AutoRebuildSetting.class); - } - - /** - * Gets known AutoRebuildSetting values. - * - * @return known AutoRebuildSetting values. - */ - public static Collection values() { - return values(AutoRebuildSetting.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.java deleted file mode 100644 index 46ef9432e5a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoScaleProperties.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; - -/** 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; - - /** Creates an instance of AutoScaleProperties class. */ - public AutoScaleProperties() { - } - - /** - * Get the minNodeCount property: The minNodeCount property. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: The minNodeCount property. - * - * @param minNodeCount the minNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the enabled property: The enabled property. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: The enabled property. - * - * @param enabled the enabled value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the maxNodeCount property: The maxNodeCount property. - * - * @return the maxNodeCount value. - */ - public Integer maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: The maxNodeCount property. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the AutoScaleProperties object itself. - */ - public AutoScaleProperties withMaxNodeCount(Integer maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 6b224b5c8fa5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoSeasonality.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.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 { - /** Creates an instance of AutoSeasonality class. */ - public AutoSeasonality() { - } - - /** - * 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 ac77cc101f2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetLags.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.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 { - /** Creates an instance of AutoTargetLags class. */ - public AutoTargetLags() { - } - - /** - * 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 b628ecb4c4c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AutoTargetRollingWindowSize.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.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 { - /** Creates an instance of AutoTargetRollingWindowSize class. */ - public AutoTargetRollingWindowSize() { - } - - /** - * 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 64daa7358c78..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Autosave.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; - -/** Auto save settings. */ -public final class Autosave extends ExpandableStringEnum { - /** Static value None for Autosave. */ - public static final Autosave NONE = fromString("None"); - - /** Static value Local for Autosave. */ - public static final Autosave LOCAL = fromString("Local"); - - /** Static value Remote for Autosave. */ - public static final Autosave REMOTE = fromString("Remote"); - - /** - * Creates a new instance of Autosave value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Autosave() { - } - - /** - * Creates or finds a Autosave from its string representation. - * - * @param name a name to look for. - * @return the corresponding Autosave. - */ - @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 24e0474c29dd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureBlobDatastore.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.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 DatastoreProperties { - /* - * 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; - - /** Creates an instance of AzureBlobDatastore class. */ - public AzureBlobDatastore() { - } - - /** - * 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 f2512a5a47e5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen1Datastore.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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 DatastoreProperties { - /* - * 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; - - /** Creates an instance of AzureDataLakeGen1Datastore class. */ - public AzureDataLakeGen1Datastore() { - } - - /** - * 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 11fa5841c6ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureDataLakeGen2Datastore.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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 DatastoreProperties { - /* - * [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; - - /** Creates an instance of AzureDataLakeGen2Datastore class. */ - public AzureDataLakeGen2Datastore() { - } - - /** - * 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 af3f62739d13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/AzureFileDatastore.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.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 DatastoreProperties { - /* - * [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; - - /** Creates an instance of AzureFileDatastore class. */ - public AzureFileDatastore() { - } - - /** - * 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 2fa766d834d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BanditPolicy.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; - -/** 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; - - /** Creates an instance of BanditPolicy class. */ - public BanditPolicy() { - } - - /** - * 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/BatchDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java deleted file mode 100644 index ff78009e7cdf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeployment.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import java.util.Map; - -/** An immutable client-side representation of BatchDeployment. */ -public interface BatchDeployment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the 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. - */ - BatchDeploymentProperties 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.BatchDeploymentInner object. - * - * @return the inner object. - */ - BatchDeploymentInner innerModel(); - - /** The entirety of the BatchDeployment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The BatchDeployment definition stages. */ - interface DefinitionStages { - /** The first stage of the BatchDeployment definition. */ - interface Blank extends WithLocation { - } - /** The stage of the BatchDeployment definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the BatchDeployment definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, endpointName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @return the next definition stage. - */ - WithProperties withExistingBatchEndpoint( - String resourceGroupName, String workspaceName, String endpointName); - } - /** The stage of the BatchDeployment definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(BatchDeploymentProperties properties); - } - /** - * The stage of the BatchDeployment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchDeployment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchDeployment create(Context context); - } - /** The stage of the BatchDeployment definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the BatchDeployment definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the BatchDeployment definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - /** The stage of the BatchDeployment definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - /** - * Begins update for the BatchDeployment resource. - * - * @return the stage of resource update. - */ - BatchDeployment.Update update(); - - /** The template for BatchDeployment update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchDeployment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchDeployment apply(Context context); - } - /** The BatchDeployment update stages. */ - interface UpdateStages { - /** The stage of the BatchDeployment update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the BatchDeployment update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: Additional attributes of the entity.. - * - * @param properties Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(PartialBatchDeployment properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BatchDeployment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchDeployment refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java deleted file mode 100644 index c9edec18e058..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentProperties.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Batch inference settings per deployment. */ -@Fluent -public final class BatchDeploymentProperties 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 DeploymentResourceConfiguration 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; - - /** Creates an instance of BatchDeploymentProperties class. */ - public BatchDeploymentProperties() { - } - - /** - * Get the compute property: Compute target for batch inference operation. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: Compute target for batch inference operation. - * - * @param compute the compute value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withCompute(String compute) { - this.compute = compute; - return this; - } - - /** - * Get the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * - * @return the errorThreshold value. - */ - public Integer errorThreshold() { - return this.errorThreshold; - } - - /** - * Set the errorThreshold property: Error threshold, if the error count for the entire input goes above this value, - * the batch inference will be aborted. Range is [-1, int.MaxValue]. For FileDataset, this value is the count of - * file failures. For TabularDataset, this value is the count of record failures. If set to -1 (the lower bound), - * all failures during batch inference will be ignored. - * - * @param errorThreshold the errorThreshold value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withErrorThreshold(Integer errorThreshold) { - this.errorThreshold = errorThreshold; - return this; - } - - /** - * Get the loggingLevel property: Logging level for batch inference operation. - * - * @return the loggingLevel value. - */ - public BatchLoggingLevel loggingLevel() { - return this.loggingLevel; - } - - /** - * Set the loggingLevel property: Logging level for batch inference operation. - * - * @param loggingLevel the loggingLevel value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withLoggingLevel(BatchLoggingLevel loggingLevel) { - this.loggingLevel = loggingLevel; - return this; - } - - /** - * Get the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @return the maxConcurrencyPerInstance value. - */ - public Integer maxConcurrencyPerInstance() { - return this.maxConcurrencyPerInstance; - } - - /** - * Set the maxConcurrencyPerInstance property: Indicates maximum number of parallelism per instance. - * - * @param maxConcurrencyPerInstance the maxConcurrencyPerInstance value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMaxConcurrencyPerInstance(Integer maxConcurrencyPerInstance) { - this.maxConcurrencyPerInstance = maxConcurrencyPerInstance; - return this; - } - - /** - * Get the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @return the miniBatchSize value. - */ - public Long miniBatchSize() { - return this.miniBatchSize; - } - - /** - * Set the miniBatchSize property: Size of the mini-batch passed to each batch invocation. For FileDataset, this is - * the number of files per mini-batch. For TabularDataset, this is the size of the records in bytes, per mini-batch. - * - * @param miniBatchSize the miniBatchSize value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withMiniBatchSize(Long miniBatchSize) { - this.miniBatchSize = miniBatchSize; - return this; - } - - /** - * Get the model property: Reference to the model asset for the endpoint deployment. - * - * @return the model value. - */ - public AssetReferenceBase model() { - return this.model; - } - - /** - * Set the model property: Reference to the model asset for the endpoint deployment. - * - * @param model the model value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withModel(AssetReferenceBase model) { - this.model = model; - return this; - } - - /** - * Get the outputAction property: Indicates how the output will be organized. - * - * @return the outputAction value. - */ - public BatchOutputAction outputAction() { - return this.outputAction; - } - - /** - * Set the outputAction property: Indicates how the output will be organized. - * - * @param outputAction the outputAction value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withOutputAction(BatchOutputAction outputAction) { - this.outputAction = outputAction; - return this; - } - - /** - * Get the outputFileName property: Customized output file name for append_row output action. - * - * @return the outputFileName value. - */ - public String outputFileName() { - return this.outputFileName; - } - - /** - * Set the outputFileName property: Customized output file name for append_row output action. - * - * @param outputFileName the outputFileName value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withOutputFileName(String outputFileName) { - this.outputFileName = outputFileName; - return this; - } - - /** - * Get the 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 DeploymentResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Indicates compute configuration for the job. If not provided, will default to the - * defaults defined in ResourceConfiguration. - * - * @param resources the resources value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withResources(DeploymentResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Get the retrySettings property: Retry Settings for the batch inference operation. If not provided, will default - * to the defaults defined in BatchRetrySettings. - * - * @return the retrySettings value. - */ - public BatchRetrySettings retrySettings() { - return this.retrySettings; - } - - /** - * Set the retrySettings property: Retry Settings for the batch inference operation. If not provided, will default - * to the defaults defined in BatchRetrySettings. - * - * @param retrySettings the retrySettings value to set. - * @return the BatchDeploymentProperties object itself. - */ - public BatchDeploymentProperties withRetrySettings(BatchRetrySettings retrySettings) { - this.retrySettings = retrySettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentProperties withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentProperties withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchDeploymentProperties 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 32e17c4cdfd0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchDeploymentTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -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; - - /** Creates an instance of BatchDeploymentTrackedResourceArmPaginatedResult class. */ - public BatchDeploymentTrackedResourceArmPaginatedResult() { - } - - /** - * 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 2566303aa8ad..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Gets a batch inference deployment by id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Endpoint name. - * @param deploymentName The identifier for the Batch deployments. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id. - */ - BatchDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Gets a batch inference deployment by id. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. - */ - BatchDeployment getById(String id); - - /** - * Gets a batch inference deployment by id. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference deployment by id along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete Batch Inference deployment (asynchronous). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new BatchDeployment resource. - * - * @param name resource name. - * @return the first stage of the new BatchDeployment definition. - */ - BatchDeployment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java deleted file mode 100644 index 00170d2cfd23..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpoint.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import java.util.Map; - -/** An immutable client-side representation of BatchEndpoint. */ -public interface BatchEndpoint { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the 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. - */ - BatchEndpointProperties 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.BatchEndpointInner object. - * - * @return the inner object. - */ - BatchEndpointInner innerModel(); - - /** The entirety of the BatchEndpoint definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The BatchEndpoint definition stages. */ - interface DefinitionStages { - /** The first stage of the BatchEndpoint definition. */ - interface Blank extends WithLocation { - } - /** The stage of the BatchEndpoint definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the BatchEndpoint definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the BatchEndpoint definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(BatchEndpointProperties properties); - } - /** - * The stage of the BatchEndpoint definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - BatchEndpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BatchEndpoint create(Context context); - } - /** The stage of the BatchEndpoint definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the BatchEndpoint definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the BatchEndpoint definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - /** The stage of the BatchEndpoint definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - /** - * Begins update for the BatchEndpoint resource. - * - * @return the stage of resource update. - */ - BatchEndpoint.Update update(); - - /** The template for BatchEndpoint update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BatchEndpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BatchEndpoint apply(Context context); - } - /** The BatchEndpoint update stages. */ - interface UpdateStages { - /** The stage of the BatchEndpoint update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the BatchEndpoint update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BatchEndpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BatchEndpoint refresh(Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.java deleted file mode 100644 index aa25ce2802e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointDefaults.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.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; - - /** Creates an instance of BatchEndpointDefaults class. */ - public BatchEndpointDefaults() { - } - - /** - * Get the deploymentName property: Name of the deployment that will be default for the endpoint. This deployment - * will end up getting 100% traffic when the endpoint scoring URL is invoked. - * - * @return the deploymentName value. - */ - public String deploymentName() { - return this.deploymentName; - } - - /** - * Set the deploymentName property: Name of the deployment that will be default for the endpoint. This deployment - * will end up getting 100% traffic when the endpoint scoring URL is invoked. - * - * @param deploymentName the deploymentName value to set. - * @return the BatchEndpointDefaults object itself. - */ - public BatchEndpointDefaults withDeploymentName(String deploymentName) { - this.deploymentName = deploymentName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java deleted file mode 100644 index 91f737a4bd0f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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 BatchEndpointProperties 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; - - /** Creates an instance of BatchEndpointProperties class. */ - public BatchEndpointProperties() { - } - - /** - * Get the defaults property: Default values for Batch Endpoint. - * - * @return the defaults value. - */ - public BatchEndpointDefaults defaults() { - return this.defaults; - } - - /** - * Set the defaults property: Default values for Batch Endpoint. - * - * @param defaults the defaults value to set. - * @return the BatchEndpointProperties object itself. - */ - public BatchEndpointProperties withDefaults(BatchEndpointDefaults defaults) { - this.defaults = defaults; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the endpoint. - * - * @return the provisioningState value. - */ - public EndpointProvisioningState provisioningState() { - return this.provisioningState; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public BatchEndpointProperties 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 d2984db78bd8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchEndpointTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -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; - - /** Creates an instance of BatchEndpointTrackedResourceArmPaginatedResult class. */ - public BatchEndpointTrackedResourceArmPaginatedResult() { - } - - /** - * 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 4762c037a92c..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Gets a batch inference endpoint by name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Name for the Batch Endpoint. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name. - */ - BatchEndpoint get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Lists batch Inference Endpoint keys. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Gets a batch inference endpoint by name. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. - */ - BatchEndpoint getById(String id); - - /** - * Gets a batch inference endpoint by name. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a batch inference endpoint by name along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete Batch Inference Endpoint (asynchronous). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new BatchEndpoint resource. - * - * @param name resource name. - * @return the first stage of the new BatchEndpoint definition. - */ - BatchEndpoint.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.java deleted file mode 100644 index 75fc37922df3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchLoggingLevel.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; - -/** - * Log verbosity for batch inferencing. Increasing verbosity order for logging is : Warning, Info and Debug. The default - * value is Info. - */ -public final class BatchLoggingLevel extends ExpandableStringEnum { - /** Static value Info for BatchLoggingLevel. */ - public static final BatchLoggingLevel INFO = fromString("Info"); - - /** Static value Warning for BatchLoggingLevel. */ - public static final BatchLoggingLevel WARNING = fromString("Warning"); - - /** Static value Debug for BatchLoggingLevel. */ - public static final BatchLoggingLevel DEBUG = fromString("Debug"); - - /** - * Creates a new instance of BatchLoggingLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BatchLoggingLevel() { - } - - /** - * Creates or finds a BatchLoggingLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchLoggingLevel. - */ - @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 3b8fd6878d96..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchOutputAction.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; - -/** Enum to determine how batch inferencing will handle output. */ -public final class BatchOutputAction extends ExpandableStringEnum { - /** Static value SummaryOnly for BatchOutputAction. */ - public static final BatchOutputAction SUMMARY_ONLY = fromString("SummaryOnly"); - - /** Static value AppendRow for BatchOutputAction. */ - public static final BatchOutputAction APPEND_ROW = fromString("AppendRow"); - - /** - * Creates a new instance of BatchOutputAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BatchOutputAction() { - } - - /** - * Creates or finds a BatchOutputAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding BatchOutputAction. - */ - @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 1d98496b92ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BatchRetrySettings.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.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; - - /** Creates an instance of BatchRetrySettings class. */ - public BatchRetrySettings() { - } - - /** - * Get the maxRetries property: Maximum retry count for a mini-batch. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: Maximum retry count for a mini-batch. - * - * @param maxRetries the maxRetries value to set. - * @return the BatchRetrySettings object itself. - */ - public BatchRetrySettings withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @return the timeout value. - */ - public Duration timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Invocation timeout for a mini-batch, in ISO 8601 format. - * - * @param timeout the timeout value to set. - * @return the BatchRetrySettings object itself. - */ - public BatchRetrySettings withTimeout(Duration timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 06e64fab9169..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BayesianSamplingAlgorithm.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.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 { - /** Creates an instance of BayesianSamplingAlgorithm class. */ - public BayesianSamplingAlgorithm() { - } - - /** - * 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 9f908f659aba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BillingCurrency.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Billing currency - * - *

Three lettered code specifying the currency of the VM price. Example: USD. - */ -public final class BillingCurrency extends ExpandableStringEnum { - /** Static value USD for BillingCurrency. */ - public static final BillingCurrency USD = fromString("USD"); - - /** - * Creates a new instance of BillingCurrency value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BillingCurrency() { - } - - /** - * Creates or finds a BillingCurrency from its string representation. - * - * @param name a name to look for. - * @return the corresponding BillingCurrency. - */ - @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/BlockedTransformers.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.java deleted file mode 100644 index 2ac161f2f5a6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BlockedTransformers.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; - -/** Enum for all classification models supported by AutoML. */ -public final class BlockedTransformers extends ExpandableStringEnum { - /** Static value TextTargetEncoder for BlockedTransformers. */ - public static final BlockedTransformers TEXT_TARGET_ENCODER = fromString("TextTargetEncoder"); - - /** Static value OneHotEncoder for BlockedTransformers. */ - public static final BlockedTransformers ONE_HOT_ENCODER = fromString("OneHotEncoder"); - - /** Static value CatTargetEncoder for BlockedTransformers. */ - public static final BlockedTransformers CAT_TARGET_ENCODER = fromString("CatTargetEncoder"); - - /** Static value TfIdf for BlockedTransformers. */ - public static final BlockedTransformers TF_IDF = fromString("TfIdf"); - - /** Static value WoETargetEncoder for BlockedTransformers. */ - public static final BlockedTransformers WO_ETARGET_ENCODER = fromString("WoETargetEncoder"); - - /** Static value LabelEncoder for BlockedTransformers. */ - public static final BlockedTransformers LABEL_ENCODER = fromString("LabelEncoder"); - - /** Static value WordEmbedding for BlockedTransformers. */ - public static final BlockedTransformers WORD_EMBEDDING = fromString("WordEmbedding"); - - /** Static value NaiveBayes for BlockedTransformers. */ - public static final BlockedTransformers NAIVE_BAYES = fromString("NaiveBayes"); - - /** Static value CountVectorizer for BlockedTransformers. */ - public static final BlockedTransformers COUNT_VECTORIZER = fromString("CountVectorizer"); - - /** Static value HashOneHotEncoder for BlockedTransformers. */ - public static final BlockedTransformers HASH_ONE_HOT_ENCODER = fromString("HashOneHotEncoder"); - - /** - * Creates a new instance of BlockedTransformers value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BlockedTransformers() { - } - - /** - * Creates or finds a BlockedTransformers from its string representation. - * - * @param name a name to look for. - * @return the corresponding BlockedTransformers. - */ - @JsonCreator - public static BlockedTransformers fromString(String name) { - return fromString(name, BlockedTransformers.class); - } - - /** - * Gets known BlockedTransformers values. - * - * @return known BlockedTransformers values. - */ - public static Collection values() { - return values(BlockedTransformers.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.java deleted file mode 100644 index 5ee7e93ad42b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/BuildContext.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; - -/** 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; - - /** Creates an instance of BuildContext class. */ - public BuildContext() { - } - - /** - * Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. <seealso - * href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * - * @return the contextUri value. - */ - public String contextUri() { - return this.contextUri; - } - - /** - * Set the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob - * URIs on environment creation and may return blob or Git URIs. <seealso - * href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />. - * - * @param contextUri the contextUri value to set. - * @return the BuildContext object itself. - */ - public BuildContext withContextUri(String contextUri) { - this.contextUri = contextUri; - return this; - } - - /** - * Get the dockerfilePath property: Path to the Dockerfile in the build context. <seealso - * href="https://docs.docker.com/engine/reference/builder/" />. - * - * @return the dockerfilePath value. - */ - public String dockerfilePath() { - return this.dockerfilePath; - } - - /** - * Set the dockerfilePath property: Path to the Dockerfile in the build context. <seealso - * href="https://docs.docker.com/engine/reference/builder/" />. - * - * @param dockerfilePath the dockerfilePath value to set. - * @return the BuildContext object itself. - */ - public BuildContext withDockerfilePath(String dockerfilePath) { - this.dockerfilePath = dockerfilePath; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (contextUri() == null) { - throw LOGGER - .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 8ada21990647..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Caching.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; - -/** Caching type of Data Disk. */ -public final class Caching extends ExpandableStringEnum { - /** Static value None for Caching. */ - public static final Caching NONE = fromString("None"); - - /** Static value ReadOnly for Caching. */ - public static final Caching READ_ONLY = fromString("ReadOnly"); - - /** Static value ReadWrite for Caching. */ - public static final Caching READ_WRITE = fromString("ReadWrite"); - - /** - * Creates a new instance of Caching value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Caching() { - } - - /** - * Creates or finds a Caching from its string representation. - * - * @param name a name to look for. - * @return the corresponding Caching. - */ - @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 028afea8b967..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreCredentials.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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; - - /** Creates an instance of CertificateDatastoreCredentials class. */ - public CertificateDatastoreCredentials() { - } - - /** - * 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 9024d4497f71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CertificateDatastoreSecrets.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.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; - - /** Creates an instance of CertificateDatastoreSecrets class. */ - public CertificateDatastoreSecrets() { - } - - /** - * 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 2a6e376d9a34..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Classification.java +++ /dev/null @@ -1,396 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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 { - /* - * Positive label for binary metrics calculation. - */ - @JsonProperty(value = "positiveLabel") - private String positiveLabel; - - /* - * Primary metric for the task. - */ - @JsonProperty(value = "primaryMetric") - private ClassificationPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private ClassificationTrainingSettings trainingSettings; - - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private MLTableJobInput testData; - - /* - * 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /* - * 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; - - /** Creates an instance of Classification class. */ - public Classification() { - } - - /** - * Get the positiveLabel property: Positive label for binary metrics calculation. - * - * @return the positiveLabel value. - */ - public String positiveLabel() { - return this.positiveLabel; - } - - /** - * Set the positiveLabel property: Positive label for binary metrics calculation. - * - * @param positiveLabel the positiveLabel value to set. - * @return the Classification object itself. - */ - public Classification withPositiveLabel(String positiveLabel) { - this.positiveLabel = positiveLabel; - return this; - } - - /** - * Get the primaryMetric property: Primary metric for the task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for the task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Classification object itself. - */ - public Classification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public ClassificationTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Classification object itself. - */ - public Classification withTrainingSettings(ClassificationTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Classification object itself. - */ - public Classification withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the 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 nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Classification object itself. - */ - public Classification withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Classification object itself. - */ - public Classification withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Classification object itself. - */ - public Classification withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Classification object itself. - */ - public Classification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Classification object itself. - */ - public Classification withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Classification object itself. - */ - public Classification withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** {@inheritDoc} */ - @Override - public Classification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public Classification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public Classification withTrainingData(MLTableJobInput 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 (trainingSettings() != null) { - trainingSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (validationData() != null) { - validationData().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 362a874a3e1e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationModels.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enum for all classification models supported by AutoML. */ -public final class ClassificationModels extends ExpandableStringEnum { - /** Static value LogisticRegression for ClassificationModels. */ - public static final ClassificationModels LOGISTIC_REGRESSION = fromString("LogisticRegression"); - - /** Static value SGD for ClassificationModels. */ - public static final ClassificationModels SGD = fromString("SGD"); - - /** Static value MultinomialNaiveBayes for ClassificationModels. */ - public static final ClassificationModels MULTINOMIAL_NAIVE_BAYES = fromString("MultinomialNaiveBayes"); - - /** Static value BernoulliNaiveBayes for ClassificationModels. */ - public static final ClassificationModels BERNOULLI_NAIVE_BAYES = fromString("BernoulliNaiveBayes"); - - /** Static value SVM for ClassificationModels. */ - public static final ClassificationModels SVM = fromString("SVM"); - - /** Static value LinearSVM for ClassificationModels. */ - public static final ClassificationModels LINEAR_SVM = fromString("LinearSVM"); - - /** Static value KNN for ClassificationModels. */ - public static final ClassificationModels KNN = fromString("KNN"); - - /** Static value DecisionTree for ClassificationModels. */ - public static final ClassificationModels DECISION_TREE = fromString("DecisionTree"); - - /** Static value RandomForest for ClassificationModels. */ - public static final ClassificationModels RANDOM_FOREST = fromString("RandomForest"); - - /** Static value ExtremeRandomTrees for ClassificationModels. */ - public static final ClassificationModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** Static value LightGBM for ClassificationModels. */ - public static final ClassificationModels LIGHT_GBM = fromString("LightGBM"); - - /** Static value GradientBoosting for ClassificationModels. */ - public static final ClassificationModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** Static value XGBoostClassifier for ClassificationModels. */ - public static final ClassificationModels XGBOOST_CLASSIFIER = fromString("XGBoostClassifier"); - - /** - * Creates a new instance of ClassificationModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationModels() { - } - - /** - * Creates or finds a ClassificationModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationModels. - */ - @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 9e75aa49e8a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationMultilabelPrimaryMetrics.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; - -/** Primary metrics for classification multilabel tasks. */ -public final class ClassificationMultilabelPrimaryMetrics - extends ExpandableStringEnum { - /** Static value AUCWeighted for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - - /** Static value Accuracy for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics ACCURACY = fromString("Accuracy"); - - /** Static value NormMacroRecall for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - - /** Static value AveragePrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = - fromString("AveragePrecisionScoreWeighted"); - - /** Static value PrecisionScoreWeighted for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics PRECISION_SCORE_WEIGHTED = - fromString("PrecisionScoreWeighted"); - - /** Static value IOU for ClassificationMultilabelPrimaryMetrics. */ - public static final ClassificationMultilabelPrimaryMetrics IOU = fromString("IOU"); - - /** - * Creates a new instance of ClassificationMultilabelPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationMultilabelPrimaryMetrics() { - } - - /** - * Creates or finds a ClassificationMultilabelPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationMultilabelPrimaryMetrics. - */ - @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 5c3d5c4eaf34..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationPrimaryMetrics.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; - -/** Primary metrics for classification tasks. */ -public final class ClassificationPrimaryMetrics extends ExpandableStringEnum { - /** Static value AUCWeighted for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics AUCWEIGHTED = fromString("AUCWeighted"); - - /** Static value Accuracy for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics ACCURACY = fromString("Accuracy"); - - /** Static value NormMacroRecall for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics NORM_MACRO_RECALL = fromString("NormMacroRecall"); - - /** Static value AveragePrecisionScoreWeighted for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics AVERAGE_PRECISION_SCORE_WEIGHTED = - fromString("AveragePrecisionScoreWeighted"); - - /** Static value PrecisionScoreWeighted for ClassificationPrimaryMetrics. */ - public static final ClassificationPrimaryMetrics PRECISION_SCORE_WEIGHTED = fromString("PrecisionScoreWeighted"); - - /** - * Creates a new instance of ClassificationPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClassificationPrimaryMetrics() { - } - - /** - * Creates or finds a ClassificationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClassificationPrimaryMetrics. - */ - @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/ClassificationTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java deleted file mode 100644 index bd667f5bbbc4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClassificationTrainingSettings.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.util.List; - -/** Classification Training related configuration. */ -@Fluent -public final class ClassificationTrainingSettings extends TrainingSettings { - /* - * Allowed models for classification task. - */ - @JsonProperty(value = "allowedTrainingAlgorithms") - private List allowedTrainingAlgorithms; - - /* - * Blocked models for classification task. - */ - @JsonProperty(value = "blockedTrainingAlgorithms") - private List blockedTrainingAlgorithms; - - /** Creates an instance of ClassificationTrainingSettings class. */ - public ClassificationTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for classification task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for classification task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the ClassificationTrainingSettings object itself. - */ - public ClassificationTrainingSettings withAllowedTrainingAlgorithms( - List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for classification task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for classification task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the ClassificationTrainingSettings object itself. - */ - public ClassificationTrainingSettings withBlockedTrainingAlgorithms( - List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** {@inheritDoc} */ - @Override - public ClassificationTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - 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/ClusterPurpose.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.java deleted file mode 100644 index 5a4525812155..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterPurpose.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; - -/** Intended usage of the cluster. */ -public final class ClusterPurpose extends ExpandableStringEnum { - /** Static value FastProd for ClusterPurpose. */ - public static final ClusterPurpose FAST_PROD = fromString("FastProd"); - - /** Static value DenseProd for ClusterPurpose. */ - public static final ClusterPurpose DENSE_PROD = fromString("DenseProd"); - - /** Static value DevTest for ClusterPurpose. */ - public static final ClusterPurpose DEV_TEST = fromString("DevTest"); - - /** - * Creates a new instance of ClusterPurpose value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ClusterPurpose() { - } - - /** - * Creates or finds a ClusterPurpose from its string representation. - * - * @param name a name to look for. - * @return the corresponding ClusterPurpose. - */ - @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 e375b833b2bf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ClusterUpdateParameters.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.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; - - /** Creates an instance of ClusterUpdateParameters class. */ - public ClusterUpdateParameters() { - } - - /** - * Get the innerProperties property: The properties of the amlCompute. - * - * @return the innerProperties value. - */ - private ClusterUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the properties property: Properties of ClusterUpdate. - * - * @return the properties value. - */ - public ScaleSettingsInformation properties() { - return this.innerProperties() == null ? null : this.innerProperties().properties(); - } - - /** - * Set the properties property: Properties of ClusterUpdate. - * - * @param properties the properties value to set. - * @return the ClusterUpdateParameters object itself. - */ - public ClusterUpdateParameters withProperties(ScaleSettingsInformation properties) { - if (this.innerProperties() == null) { - this.innerProperties = new ClusterUpdateProperties(); - } - this.innerProperties().withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} 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 1da5ea3ab59c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeConfiguration.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; - -/** 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; - - /** Creates an instance of CodeConfiguration class. */ - public CodeConfiguration() { - } - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the CodeConfiguration object itself. - */ - public CodeConfiguration withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * - * @return the scoringScript value. - */ - public String scoringScript() { - return this.scoringScript; - } - - /** - * Set the scoringScript property: [Required] The script to execute on startup. eg. "score.py". - * - * @param scoringScript the scoringScript value to set. - * @return the CodeConfiguration object itself. - */ - public CodeConfiguration withScoringScript(String scoringScript) { - this.scoringScript = scoringScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scoringScript() == null) { - throw LOGGER - .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/CodeContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.java deleted file mode 100644 index 3d41404e0fc4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainer.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.CodeContainerInner; - -/** An immutable client-side representation of CodeContainer. */ -public interface CodeContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - CodeContainerProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner object. - * - * @return the inner object. - */ - CodeContainerInner innerModel(); - - /** The entirety of the CodeContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The CodeContainer definition stages. */ - interface DefinitionStages { - /** The first stage of the CodeContainer definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the CodeContainer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the CodeContainer definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(CodeContainerProperties properties); - } - /** - * The stage of the CodeContainer definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - CodeContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeContainer create(Context context); - } - } - /** - * Begins update for the CodeContainer resource. - * - * @return the stage of resource update. - */ - CodeContainer.Update update(); - - /** The template for CodeContainer update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeContainer apply(Context context); - } - /** The CodeContainer update stages. */ - interface UpdateStages { - /** The stage of the CodeContainer update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(CodeContainerProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.java deleted file mode 100644 index 9f59aab192f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerProperties.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 java.util.Map; - -/** Container for code asset versions. */ -@Fluent -public final class CodeContainerProperties extends AssetContainer { - /** Creates an instance of CodeContainerProperties class. */ - public CodeContainerProperties() { - } - - /** {@inheritDoc} */ - @Override - public CodeContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeContainerProperties 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 fdb6888e079b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -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; - - /** Creates an instance of CodeContainerResourceArmPaginatedResult class. */ - public CodeContainerResourceArmPaginatedResult() { - } - - /** - * 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 ed9bae7d57a0..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - CodeContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - CodeContainer getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeContainer resource. - * - * @param name resource name. - * @return the first stage of the new CodeContainer definition. - */ - CodeContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.java deleted file mode 100644 index 74b92c620c7c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersion.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.CodeVersionInner; - -/** An immutable client-side representation of CodeVersion. */ -public interface CodeVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - CodeVersionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner object. - * - * @return the inner object. - */ - CodeVersionInner innerModel(); - - /** The entirety of the CodeVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The CodeVersion definition stages. */ - interface DefinitionStages { - /** The first stage of the CodeVersion definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the CodeVersion definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingCode(String resourceGroupName, String workspaceName, String name); - } - /** The stage of the CodeVersion definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(CodeVersionProperties properties); - } - /** - * The stage of the CodeVersion definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - CodeVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - CodeVersion create(Context context); - } - } - /** - * Begins update for the CodeVersion resource. - * - * @return the stage of resource update. - */ - CodeVersion.Update update(); - - /** The template for CodeVersion update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - CodeVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - CodeVersion apply(Context context); - } - /** The CodeVersion update stages. */ - interface UpdateStages { - /** The stage of the CodeVersion update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(CodeVersionProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - CodeVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - CodeVersion refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java deleted file mode 100644 index aa9586a3dcee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 CodeVersionProperties extends AssetBase { - /* - * Uri where code is located - */ - @JsonProperty(value = "codeUri") - private String codeUri; - - /** Creates an instance of CodeVersionProperties class. */ - public CodeVersionProperties() { - } - - /** - * Get the codeUri property: Uri where code is located. - * - * @return the codeUri value. - */ - public String codeUri() { - return this.codeUri; - } - - /** - * Set the codeUri property: Uri where code is located. - * - * @param codeUri the codeUri value to set. - * @return the CodeVersionProperties object itself. - */ - public CodeVersionProperties withCodeUri(String codeUri) { - this.codeUri = codeUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public CodeVersionProperties 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 64ed58a5722f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CodeVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeVersionInner; -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; - - /** Creates an instance of CodeVersionResourceArmPaginatedResult class. */ - public CodeVersionResourceArmPaginatedResult() { - } - - /** - * 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 832a78bf6085..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - CodeVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - CodeVersion getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new CodeVersion resource. - * - * @param name resource name. - * @return the first stage of the new CodeVersion definition. - */ - CodeVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.java deleted file mode 100644 index 649d7c174071..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ColumnTransformer.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; - -/** 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; - - /** Creates an instance of ColumnTransformer class. */ - public ColumnTransformer() { - } - - /** - * Get the fields property: Fields to apply transformer logic on. - * - * @return the fields value. - */ - public List fields() { - return this.fields; - } - - /** - * Set the fields property: Fields to apply transformer logic on. - * - * @param fields the fields value to set. - * @return the ColumnTransformer object itself. - */ - public ColumnTransformer withFields(List fields) { - this.fields = fields; - return this; - } - - /** - * Get the parameters property: Different properties to be passed to transformer. Input expected is dictionary of - * key,value pairs in JSON format. - * - * @return the parameters value. - */ - public Object parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Different properties to be passed to transformer. Input expected is dictionary of - * key,value pairs in JSON format. - * - * @param parameters the parameters value to set. - * @return the ColumnTransformer object itself. - */ - public ColumnTransformer withParameters(Object parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f7f423aed984..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJob.java +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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 JobBaseProperties { - /* - * 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 JobResourceConfiguration resources; - - /** Creates an instance of CommandJob class. */ - public CommandJob() { - } - - /** - * 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 JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the CommandJob object itself. - */ - public CommandJob withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** {@inheritDoc} */ - @Override - public CommandJob withComponentId(String componentId) { - super.withComponentId(componentId); - 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 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 5b2b21d51c28..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CommandJobLimits.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.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 { - /** Creates an instance of CommandJobLimits class. */ - public CommandJobLimits() { - } - - /** {@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/ComponentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.java deleted file mode 100644 index 2db458e03fb1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainer.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.ComponentContainerInner; - -/** An immutable client-side representation of ComponentContainer. */ -public interface ComponentContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ComponentContainerProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner object. - * - * @return the inner object. - */ - ComponentContainerInner innerModel(); - - /** The entirety of the ComponentContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ComponentContainer definition stages. */ - interface DefinitionStages { - /** The first stage of the ComponentContainer definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ComponentContainer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the ComponentContainer definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ComponentContainerProperties properties); - } - /** - * The stage of the ComponentContainer definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComponentContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentContainer create(Context context); - } - } - /** - * Begins update for the ComponentContainer resource. - * - * @return the stage of resource update. - */ - ComponentContainer.Update update(); - - /** The template for ComponentContainer update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentContainer apply(Context context); - } - /** The ComponentContainer update stages. */ - interface UpdateStages { - /** The stage of the ComponentContainer update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ComponentContainerProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.java deleted file mode 100644 index 514b48b0968f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerProperties.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.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 ComponentContainerProperties extends AssetContainer { - /** Creates an instance of ComponentContainerProperties class. */ - public ComponentContainerProperties() { - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentContainerProperties 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 0be978c7adf2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -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; - - /** Creates an instance of ComponentContainerResourceArmPaginatedResult class. */ - public ComponentContainerResourceArmPaginatedResult() { - } - - /** - * 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 4339a456fddc..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - ComponentContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - ComponentContainer getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentContainer resource. - * - * @param name resource name. - * @return the first stage of the new ComponentContainer definition. - */ - ComponentContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.java deleted file mode 100644 index 3b45a1f1eb5e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersion.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.ComponentVersionInner; - -/** An immutable client-side representation of ComponentVersion. */ -public interface ComponentVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ComponentVersionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner object. - * - * @return the inner object. - */ - ComponentVersionInner innerModel(); - - /** The entirety of the ComponentVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ComponentVersion definition stages. */ - interface DefinitionStages { - /** The first stage of the ComponentVersion definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ComponentVersion definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @return the next definition stage. - */ - WithProperties withExistingComponent(String resourceGroupName, String workspaceName, String name); - } - /** The stage of the ComponentVersion definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ComponentVersionProperties properties); - } - /** - * The stage of the ComponentVersion definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ComponentVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ComponentVersion create(Context context); - } - } - /** - * Begins update for the ComponentVersion resource. - * - * @return the stage of resource update. - */ - ComponentVersion.Update update(); - - /** The template for ComponentVersion update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ComponentVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ComponentVersion apply(Context context); - } - /** The ComponentVersion update stages. */ - interface UpdateStages { - /** The stage of the ComponentVersion update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ComponentVersionProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ComponentVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ComponentVersion refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java deleted file mode 100644 index 0dde26bb4437..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionProperties.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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 ComponentVersionProperties extends AssetBase { - /* - * Defines Component definition details. - * - */ - @JsonProperty(value = "componentSpec") - private Object componentSpec; - - /** Creates an instance of ComponentVersionProperties class. */ - public ComponentVersionProperties() { - } - - /** - * Get the componentSpec property: Defines Component definition details. <see - * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * - * @return the componentSpec value. - */ - public Object componentSpec() { - return this.componentSpec; - } - - /** - * Set the componentSpec property: Defines Component definition details. <see - * href="https://docs.microsoft.com/en-us/azure/machine-learning/reference-yaml-component-command" />. - * - * @param componentSpec the componentSpec value to set. - * @return the ComponentVersionProperties object itself. - */ - public ComponentVersionProperties withComponentSpec(Object componentSpec) { - this.componentSpec = componentSpec; - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComponentVersionProperties 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 d78b0c57e190..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComponentVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -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; - - /** Creates an instance of ComponentVersionResourceArmPaginatedResult class. */ - public ComponentVersionResourceArmPaginatedResult() { - } - - /** - * 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 ee49889d9758..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - ComponentVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - ComponentVersion getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComponentVersion resource. - * - * @param name resource name. - * @return the first stage of the new ComponentVersion definition. - */ - ComponentVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.java deleted file mode 100644 index 1ed2a4317c3a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Compute.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.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") - 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; - - /** Creates an instance of Compute class. */ - public Compute() { - } - - /** - * Get the computeLocation property: Location for the underlying compute. - * - * @return the computeLocation value. - */ - public String computeLocation() { - return this.computeLocation; - } - - /** - * Set the computeLocation property: Location for the underlying compute. - * - * @param computeLocation the computeLocation value to set. - * @return the Compute object itself. - */ - public Compute withComputeLocation(String computeLocation) { - this.computeLocation = computeLocation; - return this; - } - - /** - * Get the provisioningState property: The provision state of the cluster. Valid values are Unknown, Updating, - * Provisioning, Succeeded, and Failed. - * - * @return the provisioningState value. - */ - public ProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * 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 3c1201eb4546..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstance.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of ComputeInstance class. */ - public ComputeInstance() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public ComputeInstance withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 efaf0271b71e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceApplication.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; - -/** 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; - - /** Creates an instance of ComputeInstanceApplication class. */ - public ComputeInstanceApplication() { - } - - /** - * Get the displayName property: Name of the ComputeInstance application. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Name of the ComputeInstance application. - * - * @param displayName the displayName value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the endpointUri property: Application' endpoint URI. - * - * @return the endpointUri value. - */ - public String endpointUri() { - return this.endpointUri; - } - - /** - * Set the endpointUri property: Application' endpoint URI. - * - * @param endpointUri the endpointUri value to set. - * @return the ComputeInstanceApplication object itself. - */ - public ComputeInstanceApplication withEndpointUri(String endpointUri) { - this.endpointUri = endpointUri; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 998bf39f0692..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceAuthorizationType.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Compute Instance Authorization type. - * - *

The Compute Instance Authorization type. Available values are personal (default). - */ -public final class ComputeInstanceAuthorizationType extends ExpandableStringEnum { - /** Static value personal for ComputeInstanceAuthorizationType. */ - public static final ComputeInstanceAuthorizationType PERSONAL = fromString("personal"); - - /** - * Creates a new instance of ComputeInstanceAuthorizationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeInstanceAuthorizationType() { - } - - /** - * Creates or finds a ComputeInstanceAuthorizationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceAuthorizationType. - */ - @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 f0cb84e7f405..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceConnectivityEndpoints.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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; - - /** Creates an instance of ComputeInstanceConnectivityEndpoints class. */ - public ComputeInstanceConnectivityEndpoints() { - } - - /** - * Get the publicIpAddress property: Public IP Address of this ComputeInstance. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the privateIpAddress property: Private IP Address of this ComputeInstance (local to the VNET in which the - * compute instance is deployed). - * - * @return the privateIpAddress value. - */ - public String privateIpAddress() { - return this.privateIpAddress; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 e9b49d988547..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceContainer.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ComputeInstanceContainer class. */ - public ComputeInstanceContainer() { - } - - /** - * Get the name property: Name of the ComputeInstance container. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the ComputeInstance container. - * - * @param name the name value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the autosave property: Auto save settings. - * - * @return the autosave value. - */ - public Autosave autosave() { - return this.autosave; - } - - /** - * Set the autosave property: Auto save settings. - * - * @param autosave the autosave value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withAutosave(Autosave autosave) { - this.autosave = autosave; - return this; - } - - /** - * Get the gpu property: Information of GPU. - * - * @return the gpu value. - */ - public String gpu() { - return this.gpu; - } - - /** - * Set the gpu property: Information of GPU. - * - * @param gpu the gpu value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withGpu(String gpu) { - this.gpu = gpu; - return this; - } - - /** - * Get the network property: network of this container. - * - * @return the network value. - */ - public Network network() { - return this.network; - } - - /** - * Set the network property: network of this container. - * - * @param network the network value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withNetwork(Network network) { - this.network = network; - return this; - } - - /** - * Get the environment property: Environment information of this container. - * - * @return the environment value. - */ - public ComputeInstanceEnvironmentInfo environment() { - return this.environment; - } - - /** - * Set the environment property: Environment information of this container. - * - * @param environment the environment value to set. - * @return the ComputeInstanceContainer object itself. - */ - public ComputeInstanceContainer withEnvironment(ComputeInstanceEnvironmentInfo environment) { - this.environment = environment; - return this; - } - - /** - * Get the services property: services of this containers. - * - * @return the services value. - */ - public List services() { - return this.services; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environment() != null) { - environment().validate(); - } - } -} 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 91652991d01b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceCreatedBy.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of ComputeInstanceCreatedBy class. */ - public ComputeInstanceCreatedBy() { - } - - /** - * Get the username property: Name of the user. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the userOrgId property: Uniquely identifies user' Azure Active Directory organization. - * - * @return the userOrgId value. - */ - public String userOrgId() { - return this.userOrgId; - } - - /** - * Get the userId property: Uniquely identifies the user within his/her organization. - * - * @return the userId value. - */ - public String userId() { - return this.userId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 3c23d8dd308d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataDisk.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; - -/** 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; - - /** Creates an instance of ComputeInstanceDataDisk class. */ - public ComputeInstanceDataDisk() { - } - - /** - * Get the caching property: Caching type of Data Disk. - * - * @return the caching value. - */ - public Caching caching() { - return this.caching; - } - - /** - * Set the caching property: Caching type of Data Disk. - * - * @param caching the caching value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withCaching(Caching caching) { - this.caching = caching; - return this; - } - - /** - * Get the diskSizeGB property: The initial disk size in gigabytes. - * - * @return the diskSizeGB value. - */ - public Integer diskSizeGB() { - return this.diskSizeGB; - } - - /** - * Set the diskSizeGB property: The initial disk size in gigabytes. - * - * @param diskSizeGB the diskSizeGB value to set. - * @return the ComputeInstanceDataDisk object itself. - */ - public ComputeInstanceDataDisk withDiskSizeGB(Integer diskSizeGB) { - this.diskSizeGB = diskSizeGB; - return this; - } - - /** - * Get the lun property: The 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 b5c6decae93d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceDataMount.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.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; - - /** Creates an instance of ComputeInstanceDataMount class. */ - public ComputeInstanceDataMount() { - } - - /** - * Get the source property: Source of the ComputeInstance data mount. - * - * @return the source value. - */ - public String source() { - return this.source; - } - - /** - * Set the source property: Source of the ComputeInstance data mount. - * - * @param source the source value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withSource(String source) { - this.source = source; - return this; - } - - /** - * Get the sourceType property: Data source type. - * - * @return the sourceType value. - */ - public SourceType sourceType() { - return this.sourceType; - } - - /** - * Set the sourceType property: Data source type. - * - * @param sourceType the sourceType value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withSourceType(SourceType sourceType) { - this.sourceType = sourceType; - return this; - } - - /** - * Get the mountName property: name of the ComputeInstance data mount. - * - * @return the mountName value. - */ - public String mountName() { - return this.mountName; - } - - /** - * Set the mountName property: name of the ComputeInstance data mount. - * - * @param mountName the mountName value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountName(String mountName) { - this.mountName = mountName; - return this; - } - - /** - * Get the mountAction property: Mount Action. - * - * @return the mountAction value. - */ - public MountAction mountAction() { - return this.mountAction; - } - - /** - * Set the mountAction property: Mount Action. - * - * @param mountAction the mountAction value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountAction(MountAction mountAction) { - this.mountAction = mountAction; - return this; - } - - /** - * Get the createdBy property: who this data mount created by. - * - * @return the createdBy value. - */ - public String createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: who this data mount created by. - * - * @param createdBy the createdBy value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the mountPath property: Path of this data mount. - * - * @return the mountPath value. - */ - public String mountPath() { - return this.mountPath; - } - - /** - * Set the mountPath property: Path of this data mount. - * - * @param mountPath the mountPath value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountPath(String mountPath) { - this.mountPath = mountPath; - return this; - } - - /** - * Get the mountState property: Mount state. - * - * @return the mountState value. - */ - public MountState mountState() { - return this.mountState; - } - - /** - * Set the mountState property: Mount state. - * - * @param mountState the mountState value to set. - * @return the ComputeInstanceDataMount object itself. - */ - public ComputeInstanceDataMount withMountState(MountState mountState) { - this.mountState = mountState; - return this; - } - - /** - * Get the mountedOn property: 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 d0e05ed76298..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceEnvironmentInfo.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; - -/** 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; - - /** Creates an instance of ComputeInstanceEnvironmentInfo class. */ - public ComputeInstanceEnvironmentInfo() { - } - - /** - * Get the name property: name of environment. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: name of environment. - * - * @param name the name value to set. - * @return the ComputeInstanceEnvironmentInfo object itself. - */ - public ComputeInstanceEnvironmentInfo withName(String name) { - this.name = name; - return this; - } - - /** - * Get the version property: version of environment. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: version of environment. - * - * @param version the version value to set. - * @return the ComputeInstanceEnvironmentInfo object itself. - */ - public ComputeInstanceEnvironmentInfo withVersion(String version) { - this.version = version; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 3f656ff40efc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceLastOperation.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.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; - - /** Creates an instance of ComputeInstanceLastOperation class. */ - public ComputeInstanceLastOperation() { - } - - /** - * Get the operationName property: Name of the last operation. - * - * @return the operationName value. - */ - public OperationName operationName() { - return this.operationName; - } - - /** - * Set the operationName property: Name of the last operation. - * - * @param operationName the operationName value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationName(OperationName operationName) { - this.operationName = operationName; - return this; - } - - /** - * Get the operationTime property: Time of the last operation. - * - * @return the operationTime value. - */ - public OffsetDateTime operationTime() { - return this.operationTime; - } - - /** - * Set the operationTime property: Time of the last operation. - * - * @param operationTime the operationTime value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationTime(OffsetDateTime operationTime) { - this.operationTime = operationTime; - return this; - } - - /** - * Get the operationStatus property: Operation status. - * - * @return the operationStatus value. - */ - public OperationStatus operationStatus() { - return this.operationStatus; - } - - /** - * Set the operationStatus property: Operation status. - * - * @param operationStatus the operationStatus value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationStatus(OperationStatus operationStatus) { - this.operationStatus = operationStatus; - return this; - } - - /** - * Get the operationTrigger property: Trigger of operation. - * - * @return the operationTrigger value. - */ - public OperationTrigger operationTrigger() { - return this.operationTrigger; - } - - /** - * Set the operationTrigger property: Trigger of operation. - * - * @param operationTrigger the operationTrigger value to set. - * @return the ComputeInstanceLastOperation object itself. - */ - public ComputeInstanceLastOperation withOperationTrigger(OperationTrigger operationTrigger) { - this.operationTrigger = operationTrigger; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 c5332ebf01e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceProperties.java +++ /dev/null @@ -1,474 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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; - - /** Creates an instance of ComputeInstanceProperties class. */ - public ComputeInstanceProperties() { - } - - /** - * Get the vmSize property: Virtual Machine Size. - * - * @return the vmSize value. - */ - public String vmSize() { - return this.vmSize; - } - - /** - * Set the vmSize property: Virtual Machine Size. - * - * @param vmSize the vmSize value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withVmSize(String vmSize) { - this.vmSize = vmSize; - return this; - } - - /** - * Get the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @return the subnet value. - */ - public ResourceId subnet() { - return this.subnet; - } - - /** - * Set the subnet property: Virtual network subnet resource ID the compute nodes belong to. - * - * @param subnet the subnet value to set. - * @return the ComputeInstanceProperties object itself. - */ - public ComputeInstanceProperties withSubnet(ResourceId subnet) { - this.subnet = subnet; - return this; - } - - /** - * Get the applicationSharingPolicy property: 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 48d4b12a0ab3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** Properties(top level) of ComputeInstance. */ -@Fluent -public class ComputeInstanceSchema { - /* - * Properties of ComputeInstance - */ - @JsonProperty(value = "properties") - private ComputeInstanceProperties properties; - - /** Creates an instance of ComputeInstanceSchema class. */ - public ComputeInstanceSchema() { - } - - /** - * Get the properties property: Properties of ComputeInstance. - * - * @return the properties value. - */ - public ComputeInstanceProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of ComputeInstance. - * - * @param properties the properties value to set. - * @return the ComputeInstanceSchema object itself. - */ - public ComputeInstanceSchema withProperties(ComputeInstanceProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 fa34e74a5889..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceSshSettings.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ComputeInstanceSshSettings class. */ - public ComputeInstanceSshSettings() { - } - - /** - * 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 7e62436e09e7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceState.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Current state of an ComputeInstance. */ -public final class ComputeInstanceState extends ExpandableStringEnum { - /** Static value Creating for ComputeInstanceState. */ - public static final ComputeInstanceState CREATING = fromString("Creating"); - - /** Static value CreateFailed for ComputeInstanceState. */ - public static final ComputeInstanceState CREATE_FAILED = fromString("CreateFailed"); - - /** Static value Deleting for ComputeInstanceState. */ - public static final ComputeInstanceState DELETING = fromString("Deleting"); - - /** Static value Running for ComputeInstanceState. */ - public static final ComputeInstanceState RUNNING = fromString("Running"); - - /** Static value Restarting for ComputeInstanceState. */ - public static final ComputeInstanceState RESTARTING = fromString("Restarting"); - - /** Static value JobRunning for ComputeInstanceState. */ - public static final ComputeInstanceState JOB_RUNNING = fromString("JobRunning"); - - /** Static value SettingUp for ComputeInstanceState. */ - public static final ComputeInstanceState SETTING_UP = fromString("SettingUp"); - - /** Static value SetupFailed for ComputeInstanceState. */ - public static final ComputeInstanceState SETUP_FAILED = fromString("SetupFailed"); - - /** Static value Starting for ComputeInstanceState. */ - public static final ComputeInstanceState STARTING = fromString("Starting"); - - /** Static value Stopped for ComputeInstanceState. */ - public static final ComputeInstanceState STOPPED = fromString("Stopped"); - - /** Static value Stopping for ComputeInstanceState. */ - public static final ComputeInstanceState STOPPING = fromString("Stopping"); - - /** Static value UserSettingUp for ComputeInstanceState. */ - public static final ComputeInstanceState USER_SETTING_UP = fromString("UserSettingUp"); - - /** Static value UserSetupFailed for ComputeInstanceState. */ - public static final ComputeInstanceState USER_SETUP_FAILED = fromString("UserSetupFailed"); - - /** Static value Unknown for ComputeInstanceState. */ - public static final ComputeInstanceState UNKNOWN = fromString("Unknown"); - - /** Static value Unusable for ComputeInstanceState. */ - public static final ComputeInstanceState UNUSABLE = fromString("Unusable"); - - /** - * Creates a new instance of ComputeInstanceState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeInstanceState() { - } - - /** - * Creates or finds a ComputeInstanceState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeInstanceState. - */ - @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 e8b7f1b2d1cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeInstanceVersion.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; - -/** Version of computeInstance. */ -@Fluent -public final class ComputeInstanceVersion { - /* - * Runtime of compute instance. - */ - @JsonProperty(value = "runtime") - private String runtime; - - /** Creates an instance of ComputeInstanceVersion class. */ - public ComputeInstanceVersion() { - } - - /** - * Get the runtime property: Runtime of compute instance. - * - * @return the runtime value. - */ - public String runtime() { - return this.runtime; - } - - /** - * Set the runtime property: Runtime of compute instance. - * - * @param runtime the runtime value to set. - * @return the ComputeInstanceVersion object itself. - */ - public ComputeInstanceVersion withRuntime(String runtime) { - this.runtime = runtime; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 e486bcfd2863..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputePowerAction.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; - -/** The compute power action. */ -public final class ComputePowerAction extends ExpandableStringEnum { - /** Static value Start for ComputePowerAction. */ - public static final ComputePowerAction START = fromString("Start"); - - /** Static value Stop for ComputePowerAction. */ - public static final ComputePowerAction STOP = fromString("Stop"); - - /** - * Creates a new instance of ComputePowerAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputePowerAction() { - } - - /** - * Creates or finds a ComputePowerAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputePowerAction. - */ - @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 2a15fb09ae3f..000000000000 --- 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). - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(); - - /** - * Posts a start action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(); - - /** - * Posts a start action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(Context context); - - /** - * Posts a stop action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(); - - /** - * Posts a stop action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(Context context); - - /** - * Posts a restart action to a compute instance. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(); - - /** - * Posts a restart action to a compute instance. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.java deleted file mode 100644 index 4b0b7c7000d2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeResourceSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The ComputeResourceSchema model. */ -@Fluent -public class ComputeResourceSchema { - /* - * Compute properties - */ - @JsonProperty(value = "properties") - private Compute properties; - - /** Creates an instance of ComputeResourceSchema class. */ - public ComputeResourceSchema() { - } - - /** - * Get the properties property: Compute properties. - * - * @return the properties value. - */ - public Compute properties() { - return this.properties; - } - - /** - * Set the properties property: Compute properties. - * - * @param properties the properties value to set. - * @return the ComputeResourceSchema object itself. - */ - public ComputeResourceSchema withProperties(Compute properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 78b9effb9a9f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeSchedules.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.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; - - /** Creates an instance of ComputeSchedules class. */ - public ComputeSchedules() { - } - - /** - * Get the computeStartStop property: The list of compute start stop schedules to be applied. - * - * @return the computeStartStop value. - */ - public List computeStartStop() { - return this.computeStartStop; - } - - /** - * Set the computeStartStop property: The list of compute start stop schedules to be applied. - * - * @param computeStartStop the computeStartStop value to set. - * @return the ComputeSchedules object itself. - */ - public ComputeSchedules withComputeStartStop(List computeStartStop) { - this.computeStartStop = computeStartStop; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeStartStop() != null) { - computeStartStop().forEach(e -> e.validate()); - } - } -} 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 ab0429a6d9da..000000000000 --- 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 609941e651ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeStartStopSchedule.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.fasterxml.jackson.annotation.JsonProperty; - -/** Compute start stop schedule properties. */ -@Fluent -public final class ComputeStartStopSchedule { - /* - * A system assigned id for the schedule. - */ - @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; - - /* - * Is the schedule enabled or disabled? - */ - @JsonProperty(value = "status") - private ScheduleStatus status; - - /* - * [Required] The compute power action. - */ - @JsonProperty(value = "action") - private ComputePowerAction action; - - /* - * [Required] The schedule trigger type. - */ - @JsonProperty(value = "triggerType") - private TriggerType triggerType; - - /* - * Required if triggerType is Recurrence. - */ - @JsonProperty(value = "recurrence") - private RecurrenceTrigger recurrence; - - /* - * Required if triggerType is Cron. - */ - @JsonProperty(value = "cron") - private CronTrigger cron; - - /* - * [Deprecated] Not used any more. - */ - @JsonProperty(value = "schedule") - private ScheduleBase schedule; - - /** Creates an instance of ComputeStartStopSchedule class. */ - public ComputeStartStopSchedule() { - } - - /** - * Get the id property: A system assigned id for the schedule. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the provisioningStatus property: The current deployment state of schedule. - * - * @return the provisioningStatus value. - */ - public ProvisioningStatus provisioningStatus() { - return this.provisioningStatus; - } - - /** - * Get the status property: Is the schedule enabled or disabled?. - * - * @return the status value. - */ - public ScheduleStatus status() { - return this.status; - } - - /** - * Set the status property: Is the schedule enabled or disabled?. - * - * @param status the status value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withStatus(ScheduleStatus status) { - this.status = status; - return this; - } - - /** - * Get the action property: [Required] The compute power action. - * - * @return the action value. - */ - public ComputePowerAction action() { - return this.action; - } - - /** - * Set the action property: [Required] The compute power action. - * - * @param action the action value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withAction(ComputePowerAction action) { - this.action = action; - return this; - } - - /** - * Get the triggerType property: [Required] The schedule trigger type. - * - * @return the triggerType value. - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Set the triggerType property: [Required] The schedule trigger type. - * - * @param triggerType the triggerType value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withTriggerType(TriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get the recurrence property: Required if triggerType is Recurrence. - * - * @return the recurrence value. - */ - public RecurrenceTrigger recurrence() { - return this.recurrence; - } - - /** - * Set the recurrence property: Required if triggerType is Recurrence. - * - * @param recurrence the recurrence value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withRecurrence(RecurrenceTrigger recurrence) { - this.recurrence = recurrence; - return this; - } - - /** - * Get the cron property: Required if triggerType is Cron. - * - * @return the cron value. - */ - public CronTrigger cron() { - return this.cron; - } - - /** - * Set the cron property: Required if triggerType is Cron. - * - * @param cron the cron value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withCron(CronTrigger cron) { - this.cron = cron; - return this; - } - - /** - * Get the schedule property: [Deprecated] Not used any more. - * - * @return the schedule value. - */ - public ScheduleBase schedule() { - return this.schedule; - } - - /** - * Set the schedule property: [Deprecated] Not used any more. - * - * @param schedule the schedule value to set. - * @return the ComputeStartStopSchedule object itself. - */ - public ComputeStartStopSchedule withSchedule(ScheduleBase schedule) { - this.schedule = schedule; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recurrence() != null) { - recurrence().validate(); - } - if (cron() != null) { - cron().validate(); - } - if (schedule() != null) { - schedule().validate(); - } - } -} 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 c3a28e6d0560..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ComputeType.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; - -/** The type of compute. */ -public final class ComputeType extends ExpandableStringEnum { - /** Static value AKS for ComputeType. */ - public static final ComputeType AKS = fromString("AKS"); - - /** Static value Kubernetes for ComputeType. */ - public static final ComputeType KUBERNETES = fromString("Kubernetes"); - - /** Static value AmlCompute for ComputeType. */ - public static final ComputeType AML_COMPUTE = fromString("AmlCompute"); - - /** Static value ComputeInstance for ComputeType. */ - public static final ComputeType COMPUTE_INSTANCE = fromString("ComputeInstance"); - - /** Static value DataFactory for ComputeType. */ - public static final ComputeType DATA_FACTORY = fromString("DataFactory"); - - /** Static value VirtualMachine for ComputeType. */ - public static final ComputeType VIRTUAL_MACHINE = fromString("VirtualMachine"); - - /** Static value HDInsight for ComputeType. */ - public static final ComputeType HDINSIGHT = fromString("HDInsight"); - - /** Static value Databricks for ComputeType. */ - public static final ComputeType DATABRICKS = fromString("Databricks"); - - /** Static value DataLakeAnalytics for ComputeType. */ - public static final ComputeType DATA_LAKE_ANALYTICS = fromString("DataLakeAnalytics"); - - /** Static value SynapseSpark for ComputeType. */ - public static final ComputeType SYNAPSE_SPARK = fromString("SynapseSpark"); - - /** - * Creates a new instance of ComputeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ComputeType() { - } - - /** - * Creates or finds a ComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ComputeType. - */ - @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 007d1460f249..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name. - */ - ComputeResource get(String resourceGroupName, String workspaceName, String computeName); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction); - - /** - * Deletes specified Machine Learning compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param underlyingResourceAction Delete the underlying compute if 'Delete', or detach the underlying compute from - * workspace if 'Detach'. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete( - String resourceGroupName, - String workspaceName, - String computeName, - UnderlyingResourceAction underlyingResourceAction, - Context context); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName); - - /** - * Get the details (e.g IP address, port etc) of all the compute nodes in the compute. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the details (e.g IP address, port etc) of all the compute nodes in the compute as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listNodes( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc) along with {@link - * Response}. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets secrets related to Machine Learning compute (storage keys, service credentials, etc). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return secrets related to Machine Learning compute (storage keys, service credentials, etc). - */ - ComputeSecrets listKeys(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a start action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void start(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a stop action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void stop(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(String resourceGroupName, String workspaceName, String computeName); - - /** - * Posts a restart action to a compute instance. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param computeName Name of the Azure Machine Learning compute. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void restart(String resourceGroupName, String workspaceName, String computeName, Context context); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. - */ - ComputeResource getById(String id); - - /** - * Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use - * 'keys' nested resource to get them. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return compute definition by its name along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ComputeResource resource. - * - * @param name resource name. - * @return the first stage of the new ComputeResource definition. - */ - ComputeResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.java deleted file mode 100644 index 04ac12e98553..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionAuthType.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; - -/** Authentication type of the connection target. */ -public final class ConnectionAuthType extends ExpandableStringEnum { - /** Static value PAT for ConnectionAuthType. */ - public static final ConnectionAuthType PAT = fromString("PAT"); - - /** Static value ManagedIdentity for ConnectionAuthType. */ - public static final ConnectionAuthType MANAGED_IDENTITY = fromString("ManagedIdentity"); - - /** Static value UsernamePassword for ConnectionAuthType. */ - public static final ConnectionAuthType USERNAME_PASSWORD = fromString("UsernamePassword"); - - /** Static value None for ConnectionAuthType. */ - public static final ConnectionAuthType NONE = fromString("None"); - - /** Static value SAS for ConnectionAuthType. */ - public static final ConnectionAuthType SAS = fromString("SAS"); - - /** - * Creates a new instance of ConnectionAuthType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionAuthType() { - } - - /** - * Creates or finds a ConnectionAuthType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionAuthType. - */ - @JsonCreator - public static ConnectionAuthType fromString(String name) { - return fromString(name, ConnectionAuthType.class); - } - - /** - * Gets known ConnectionAuthType values. - * - * @return known ConnectionAuthType values. - */ - public static Collection values() { - return values(ConnectionAuthType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.java deleted file mode 100644 index bbddfa94d65d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ConnectionCategory.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; - -/** Category of the connection. */ -public final class ConnectionCategory extends ExpandableStringEnum { - /** Static value PythonFeed for ConnectionCategory. */ - public static final ConnectionCategory PYTHON_FEED = fromString("PythonFeed"); - - /** Static value ContainerRegistry for ConnectionCategory. */ - public static final ConnectionCategory CONTAINER_REGISTRY = fromString("ContainerRegistry"); - - /** Static value Git for ConnectionCategory. */ - public static final ConnectionCategory GIT = fromString("Git"); - - /** - * Creates a new instance of ConnectionCategory value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectionCategory() { - } - - /** - * Creates or finds a ConnectionCategory from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectionCategory. - */ - @JsonCreator - public static ConnectionCategory fromString(String name) { - return fromString(name, ConnectionCategory.class); - } - - /** - * Gets known ConnectionCategory values. - * - * @return known ConnectionCategory values. - */ - public static Collection values() { - return values(ConnectionCategory.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.java deleted file mode 100644 index 433207abb090..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceRequirements.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; - -/** 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; - - /** Creates an instance of ContainerResourceRequirements class. */ - public ContainerResourceRequirements() { - } - - /** - * 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 ef47459f3731..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerResourceSettings.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.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; - - /** Creates an instance of ContainerResourceSettings class. */ - public ContainerResourceSettings() { - } - - /** - * Get the cpu property: Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @return the cpu value. - */ - public String cpu() { - return this.cpu; - } - - /** - * Set the cpu property: Number of vCPUs request/limit for container. More info: - * https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/. - * - * @param cpu the cpu value to set. - * @return the ContainerResourceSettings object itself. - */ - public ContainerResourceSettings withCpu(String cpu) { - this.cpu = cpu; - return this; - } - - /** - * Get the 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 68f7ef4621c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ContainerType.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 ContainerType. */ -public final class ContainerType extends ExpandableStringEnum { - /** Static value StorageInitializer for ContainerType. */ - public static final ContainerType STORAGE_INITIALIZER = fromString("StorageInitializer"); - - /** Static value InferenceServer for ContainerType. */ - public static final ContainerType INFERENCE_SERVER = fromString("InferenceServer"); - - /** - * Creates a new instance of ContainerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContainerType() { - } - - /** - * Creates or finds a ContainerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerType. - */ - @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 0b05e1cfaf60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CosmosDbSettings.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; - -/** The CosmosDbSettings model. */ -@Fluent -public final class CosmosDbSettings { - /* - * The throughput of the collections in cosmosdb database - */ - @JsonProperty(value = "collectionsThroughput") - private Integer collectionsThroughput; - - /** Creates an instance of CosmosDbSettings class. */ - public CosmosDbSettings() { - } - - /** - * Get the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @return the collectionsThroughput value. - */ - public Integer collectionsThroughput() { - return this.collectionsThroughput; - } - - /** - * Set the collectionsThroughput property: The throughput of the collections in cosmosdb database. - * - * @param collectionsThroughput the collectionsThroughput value to set. - * @return the CosmosDbSettings object itself. - */ - public CosmosDbSettings withCollectionsThroughput(Integer collectionsThroughput) { - this.collectionsThroughput = collectionsThroughput; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 7596a8d963da..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CredentialsType.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; - -/** Enum to determine the datastore credentials type. */ -public final class CredentialsType extends ExpandableStringEnum { - /** Static value AccountKey for CredentialsType. */ - public static final CredentialsType ACCOUNT_KEY = fromString("AccountKey"); - - /** Static value Certificate for CredentialsType. */ - public static final CredentialsType CERTIFICATE = fromString("Certificate"); - - /** Static value None for CredentialsType. */ - public static final CredentialsType NONE = fromString("None"); - - /** Static value Sas for CredentialsType. */ - public static final CredentialsType SAS = fromString("Sas"); - - /** Static value ServicePrincipal for CredentialsType. */ - public static final CredentialsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); - - /** - * Creates a new instance of CredentialsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CredentialsType() { - } - - /** - * Creates or finds a CredentialsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CredentialsType. - */ - @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/CronTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java deleted file mode 100644 index 362c9d532dc8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CronTrigger.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 CronTrigger model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") -@JsonTypeName("Cron") -@Fluent -public final class CronTrigger extends TriggerBase { - /* - * [Required] Specifies cron expression of schedule. - * The expression should follow NCronTab format. - */ - @JsonProperty(value = "expression", required = true) - private String expression; - - /** Creates an instance of CronTrigger class. */ - public CronTrigger() { - } - - /** - * Get the expression property: [Required] Specifies cron expression of schedule. The expression should follow - * NCronTab format. - * - * @return the expression value. - */ - public String expression() { - return this.expression; - } - - /** - * Set the expression property: [Required] Specifies cron expression of schedule. The expression should follow - * NCronTab format. - * - * @param expression the expression value to set. - * @return the CronTrigger object itself. - */ - public CronTrigger withExpression(String expression) { - this.expression = expression; - return this; - } - - /** {@inheritDoc} */ - @Override - public CronTrigger withEndTime(String endTime) { - super.withEndTime(endTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronTrigger withStartTime(String startTime) { - super.withStartTime(startTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public CronTrigger withTimeZone(String timeZone) { - super.withTimeZone(timeZone); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (expression() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property expression in model CronTrigger")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CronTrigger.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 495856b62f74..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomForecastHorizon.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.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; - - /** Creates an instance of CustomForecastHorizon class. */ - public CustomForecastHorizon() { - } - - /** - * 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 65061d9cdf22..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobInput.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.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("custom_model") -@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; - - /** Creates an instance of CustomModelJobInput class. */ - public CustomModelJobInput() { - } - - /** - * 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 b68ea2621db9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomModelJobOutput.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 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("custom_model") -@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; - - /** Creates an instance of CustomModelJobOutput class. */ - public CustomModelJobOutput() { - } - - /** - * 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 fb61bff1cc77..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomNCrossValidations.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.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; - - /** Creates an instance of CustomNCrossValidations class. */ - public CustomNCrossValidations() { - } - - /** - * 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 d9b507c43f12..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomSeasonality.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.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; - - /** Creates an instance of CustomSeasonality class. */ - public CustomSeasonality() { - } - - /** - * 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 1c3a2db01db9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetLags.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.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; - - /** Creates an instance of CustomTargetLags class. */ - public CustomTargetLags() { - } - - /** - * 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 a6809abe95b3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/CustomTargetRollingWindowSize.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.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; - - /** Creates an instance of CustomTargetRollingWindowSize class. */ - public CustomTargetRollingWindowSize() { - } - - /** - * 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/DataContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.java deleted file mode 100644 index 59ae115c87e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainer.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.DataContainerInner; - -/** An immutable client-side representation of DataContainer. */ -public interface DataContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DataContainerProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner object. - * - * @return the inner object. - */ - DataContainerInner innerModel(); - - /** The entirety of the DataContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The DataContainer definition stages. */ - interface DefinitionStages { - /** The first stage of the DataContainer definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DataContainer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the DataContainer definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DataContainerProperties properties); - } - /** - * The stage of the DataContainer definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - DataContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataContainer create(Context context); - } - } - /** - * Begins update for the DataContainer resource. - * - * @return the stage of resource update. - */ - DataContainer.Update update(); - - /** The template for DataContainer update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataContainer apply(Context context); - } - /** The DataContainer update stages. */ - interface UpdateStages { - /** The stage of the DataContainer update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DataContainerProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java deleted file mode 100644 index ef6dbc31be3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerProperties.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 DataContainerProperties extends AssetContainer { - /* - * [Required] Specifies the type of data. - */ - @JsonProperty(value = "dataType", required = true) - private DataType dataType; - - /** Creates an instance of DataContainerProperties class. */ - public DataContainerProperties() { - } - - /** - * Get the dataType property: [Required] Specifies the type of data. - * - * @return the dataType value. - */ - public DataType dataType() { - return this.dataType; - } - - /** - * Set the dataType property: [Required] Specifies the type of data. - * - * @param dataType the dataType value to set. - * @return the DataContainerProperties object itself. - */ - public DataContainerProperties withDataType(DataType dataType) { - this.dataType = dataType; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataContainerProperties 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 DataContainerProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataContainerProperties.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 df54e8cfb2e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -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; - - /** Creates an instance of DataContainerResourceArmPaginatedResult class. */ - public DataContainerResourceArmPaginatedResult() { - } - - /** - * 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 8962c038ec25..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - DataContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - DataContainer getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataContainer resource. - * - * @param name resource name. - * @return the first stage of the new DataContainer definition. - */ - DataContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.java deleted file mode 100644 index 408de6370a32..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataFactory.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.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 { - /** Creates an instance of DataFactory class. */ - public DataFactory() { - } - - /** {@inheritDoc} */ - @Override - public DataFactory withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataFactory withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 93ab2b848c2d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalytics.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of DataLakeAnalytics class. */ - public DataLakeAnalytics() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataLakeAnalytics withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 8d9dd38b62f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The DataLakeAnalyticsSchema model. */ -@Fluent -public class DataLakeAnalyticsSchema { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private DataLakeAnalyticsSchemaProperties properties; - - /** Creates an instance of DataLakeAnalyticsSchema class. */ - public DataLakeAnalyticsSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public DataLakeAnalyticsSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the DataLakeAnalyticsSchema object itself. - */ - public DataLakeAnalyticsSchema withProperties(DataLakeAnalyticsSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 645bc27f9f93..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataLakeAnalyticsSchemaProperties.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; - -/** The DataLakeAnalyticsSchemaProperties model. */ -@Fluent -public final class DataLakeAnalyticsSchemaProperties { - /* - * DataLake Store Account Name - */ - @JsonProperty(value = "dataLakeStoreAccountName") - private String dataLakeStoreAccountName; - - /** Creates an instance of DataLakeAnalyticsSchemaProperties class. */ - public DataLakeAnalyticsSchemaProperties() { - } - - /** - * Get the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @return the dataLakeStoreAccountName value. - */ - public String dataLakeStoreAccountName() { - return this.dataLakeStoreAccountName; - } - - /** - * Set the dataLakeStoreAccountName property: DataLake Store Account Name. - * - * @param dataLakeStoreAccountName the dataLakeStoreAccountName value to set. - * @return the DataLakeAnalyticsSchemaProperties object itself. - */ - public DataLakeAnalyticsSchemaProperties withDataLakeStoreAccountName(String dataLakeStoreAccountName) { - this.dataLakeStoreAccountName = dataLakeStoreAccountName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f9425ac02511..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataPathAssetReference.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.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; - - /** Creates an instance of DataPathAssetReference class. */ - public DataPathAssetReference() { - } - - /** - * 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/DataType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.java deleted file mode 100644 index 3b8eae0a61d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataType.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; - -/** Enum to determine the type of data. */ -public final class DataType extends ExpandableStringEnum { - /** Static value uri_file for DataType. */ - public static final DataType URI_FILE = fromString("uri_file"); - - /** Static value uri_folder for DataType. */ - public static final DataType URI_FOLDER = fromString("uri_folder"); - - /** Static value mltable for DataType. */ - public static final DataType MLTABLE = fromString("mltable"); - - /** - * Creates a new instance of DataType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DataType() { - } - - /** - * Creates or finds a DataType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataType. - */ - @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/DataVersionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.java deleted file mode 100644 index ad254ac4664f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBase.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.DataVersionBaseInner; - -/** An immutable client-side representation of DataVersionBase. */ -public interface DataVersionBase { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DataVersionBaseProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner object. - * - * @return the inner object. - */ - DataVersionBaseInner innerModel(); - - /** The entirety of the DataVersionBase definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The DataVersionBase definition stages. */ - interface DefinitionStages { - /** The first stage of the DataVersionBase definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the DataVersionBase definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @return the next definition stage. - */ - WithProperties withExistingData(String resourceGroupName, String workspaceName, String name); - } - /** The stage of the DataVersionBase definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DataVersionBaseProperties properties); - } - /** - * The stage of the DataVersionBase definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - DataVersionBase create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DataVersionBase create(Context context); - } - } - /** - * Begins update for the DataVersionBase resource. - * - * @return the stage of resource update. - */ - DataVersionBase.Update update(); - - /** The template for DataVersionBase update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DataVersionBase apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DataVersionBase apply(Context context); - } - /** The DataVersionBase update stages. */ - interface UpdateStages { - /** The stage of the DataVersionBase update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DataVersionBaseProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DataVersionBase refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DataVersionBase refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java deleted file mode 100644 index ad6fb4df7677..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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 = DataVersionBaseProperties.class) -@JsonTypeName("DataVersionBaseProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "mltable", value = MLTableData.class), - @JsonSubTypes.Type(name = "uri_file", value = UriFileDataVersion.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderDataVersion.class) -}) -@Fluent -public class DataVersionBaseProperties extends AssetBase { - /* - * [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.Assets.DataVersionBase.DataType - */ - @JsonProperty(value = "dataUri", required = true) - private String dataUri; - - /** Creates an instance of DataVersionBaseProperties class. */ - public DataVersionBaseProperties() { - } - - /** - * Get the dataUri property: [Required] Uri of the data. Usage/meaning depends on - * Microsoft.MachineLearning.ManagementFrontEnd.Contracts.V20221001.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.V20221001.Assets.DataVersionBase.DataType. - * - * @param dataUri the dataUri value to set. - * @return the DataVersionBaseProperties object itself. - */ - public DataVersionBaseProperties withDataUri(String dataUri) { - this.dataUri = dataUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DataVersionBaseProperties 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 DataVersionBaseProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DataVersionBaseProperties.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 6e8048afa408..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DataVersionBaseResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -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; - - /** Creates an instance of DataVersionBaseResourceArmPaginatedResult class. */ - public DataVersionBaseResourceArmPaginatedResult() { - } - - /** - * 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 e5234415cf8b..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. - * @param version Version identifier. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - DataVersionBase get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - DataVersionBase getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DataVersionBase resource. - * - * @param name resource name. - * @return the first stage of the new DataVersionBase definition. - */ - DataVersionBase.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java deleted file mode 100644 index a0f94b61afd0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Databricks.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of Databricks class. */ - public Databricks() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public Databricks withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 bd9f0dfb69f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecrets.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.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; - - /** Creates an instance of DatabricksComputeSecrets class. */ - public DatabricksComputeSecrets() { - } - - /** - * 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 3415468a0077..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksComputeSecretsProperties.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; - -/** Properties of Databricks Compute Secrets. */ -@Fluent -public class DatabricksComputeSecretsProperties { - /* - * access token for databricks account. - */ - @JsonProperty(value = "databricksAccessToken") - private String databricksAccessToken; - - /** Creates an instance of DatabricksComputeSecretsProperties class. */ - public DatabricksComputeSecretsProperties() { - } - - /** - * Get the databricksAccessToken property: access token for databricks account. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: access token for databricks account. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksComputeSecretsProperties object itself. - */ - public DatabricksComputeSecretsProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 5fff72428cc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksProperties.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; - -/** 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; - - /** Creates an instance of DatabricksProperties class. */ - public DatabricksProperties() { - } - - /** - * Get the databricksAccessToken property: Databricks access token. - * - * @return the databricksAccessToken value. - */ - public String databricksAccessToken() { - return this.databricksAccessToken; - } - - /** - * Set the databricksAccessToken property: Databricks access token. - * - * @param databricksAccessToken the databricksAccessToken value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withDatabricksAccessToken(String databricksAccessToken) { - this.databricksAccessToken = databricksAccessToken; - return this; - } - - /** - * Get the workspaceUrl property: Workspace Url. - * - * @return the workspaceUrl value. - */ - public String workspaceUrl() { - return this.workspaceUrl; - } - - /** - * Set the workspaceUrl property: Workspace Url. - * - * @param workspaceUrl the workspaceUrl value to set. - * @return the DatabricksProperties object itself. - */ - public DatabricksProperties withWorkspaceUrl(String workspaceUrl) { - this.workspaceUrl = workspaceUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 b67e4f948343..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatabricksSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The DatabricksSchema model. */ -@Fluent -public class DatabricksSchema { - /* - * Properties of Databricks - */ - @JsonProperty(value = "properties") - private DatabricksProperties properties; - - /** Creates an instance of DatabricksSchema class. */ - public DatabricksSchema() { - } - - /** - * Get the properties property: Properties of Databricks. - * - * @return the properties value. - */ - public DatabricksProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Databricks. - * - * @param properties the properties value to set. - * @return the DatabricksSchema object itself. - */ - public DatabricksSchema withProperties(DatabricksProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.java deleted file mode 100644 index 7b181093c6e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastore.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.DatastoreInner; - -/** An immutable client-side representation of Datastore. */ -public interface Datastore { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - DatastoreProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner object. - * - * @return the inner object. - */ - DatastoreInner innerModel(); - - /** The entirety of the Datastore definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The Datastore definition stages. */ - interface DefinitionStages { - /** The first stage of the Datastore definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Datastore definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the Datastore definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(DatastoreProperties properties); - } - /** - * The stage of the Datastore definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithSkipValidation { - /** - * Executes the create request. - * - * @return the created resource. - */ - Datastore create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Datastore create(Context context); - } - /** The stage of the Datastore definition allowing to specify skipValidation. */ - interface WithSkipValidation { - /** - * Specifies the skipValidation property: Flag to skip validation.. - * - * @param skipValidation Flag to skip validation. - * @return the next definition stage. - */ - WithCreate withSkipValidation(Boolean skipValidation); - } - } - /** - * Begins update for the Datastore resource. - * - * @return the stage of resource update. - */ - Datastore.Update update(); - - /** The template for Datastore update. */ - interface Update extends UpdateStages.WithProperties, UpdateStages.WithSkipValidation { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Datastore apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Datastore apply(Context context); - } - /** The Datastore update stages. */ - interface UpdateStages { - /** The stage of the Datastore update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(DatastoreProperties properties); - } - /** The stage of the Datastore update allowing to specify skipValidation. */ - interface WithSkipValidation { - /** - * Specifies the skipValidation property: Flag to skip validation.. - * - * @param skipValidation Flag to skip validation. - * @return the next definition stage. - */ - Update withSkipValidation(Boolean skipValidation); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Datastore refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Datastore refresh(Context context); - - /** - * Get datastore secrets. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * Get datastore secrets. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. - */ - DatastoreSecrets listSecrets(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.java deleted file mode 100644 index abb8e62f1cc3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreCredentials.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.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 = "None", value = NoneDatastoreCredentials.class), - @JsonSubTypes.Type(name = "Sas", value = SasDatastoreCredentials.class), - @JsonSubTypes.Type(name = "ServicePrincipal", value = ServicePrincipalDatastoreCredentials.class) -}) -@Immutable -public class DatastoreCredentials { - /** Creates an instance of DatastoreCredentials class. */ - public 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/DatastoreProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java deleted file mode 100644 index 053662bb3d11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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 = DatastoreProperties.class) -@JsonTypeName("DatastoreProperties") -@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) -}) -@Fluent -public class DatastoreProperties 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; - - /** Creates an instance of DatastoreProperties class. */ - public DatastoreProperties() { - } - - /** - * Get the credentials property: [Required] Account credentials. - * - * @return the credentials value. - */ - public DatastoreCredentials credentials() { - return this.credentials; - } - - /** - * Set the credentials property: [Required] Account credentials. - * - * @param credentials the credentials value to set. - * @return the DatastoreProperties object itself. - */ - public DatastoreProperties withCredentials(DatastoreCredentials credentials) { - this.credentials = credentials; - return this; - } - - /** - * 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 DatastoreProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public DatastoreProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public DatastoreProperties 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 DatastoreProperties")); - } else { - credentials().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DatastoreProperties.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 9acb559cf7ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -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; - - /** Creates an instance of DatastoreResourceArmPaginatedResult class. */ - public DatastoreResourceArmPaginatedResult() { - } - - /** - * 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 67b7f3d7b548..000000000000 --- 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 0258a7e012f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DatastoreType.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; - -/** Enum to determine the datastore contents type. */ -public final class DatastoreType extends ExpandableStringEnum { - /** Static value AzureBlob for DatastoreType. */ - public static final DatastoreType AZURE_BLOB = fromString("AzureBlob"); - - /** Static value AzureDataLakeGen1 for DatastoreType. */ - public static final DatastoreType AZURE_DATA_LAKE_GEN1 = fromString("AzureDataLakeGen1"); - - /** Static value AzureDataLakeGen2 for DatastoreType. */ - public static final DatastoreType AZURE_DATA_LAKE_GEN2 = fromString("AzureDataLakeGen2"); - - /** Static value AzureFile for DatastoreType. */ - public static final DatastoreType AZURE_FILE = fromString("AzureFile"); - - /** - * Creates a new instance of DatastoreType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DatastoreType() { - } - - /** - * Creates or finds a DatastoreType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DatastoreType. - */ - @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 d3adbfe3d9cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Datastores.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.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import java.util.List; - -/** Resource collection API of Datastores. */ -public interface Datastores { - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List datastores. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param count Maximum number of results to return. - * @param isDefault Filter down to the workspace default datastore. - * @param names Names of datastores to return. - * @param searchText Text to search for in the datastore names. - * @param orderBy Order by property (createdtime | modifiedtime | name). - * @param orderByAsc Order by property in ascending order. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Datastore entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - Integer count, - Boolean isDefault, - List names, - String searchText, - String orderBy, - Boolean orderByAsc, - Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get datastore. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore. - */ - Datastore get(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets along with {@link Response}. - */ - Response listSecretsWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get datastore secrets. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Datastore name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore secrets. - */ - DatastoreSecrets listSecrets(String resourceGroupName, String workspaceName, String name); - - /** - * Get datastore. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. - */ - Datastore getById(String id); - - /** - * Get datastore. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datastore along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete datastore. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete datastore. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Datastore resource. - * - * @param name resource name. - * @return the first stage of the new Datastore definition. - */ - Datastore.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.java deleted file mode 100644 index 0dbc03ac6538..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DefaultScaleSettings.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.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 { - /** Creates an instance of DefaultScaleSettings class. */ - public DefaultScaleSettings() { - } - - /** - * 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 a16cf2ec0073..000000000000 --- 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 12a5f06c5c2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentLogsRequest.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; - -/** 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; - - /** Creates an instance of DeploymentLogsRequest class. */ - public DeploymentLogsRequest() { - } - - /** - * Get the containerType property: The type of container to retrieve logs from. - * - * @return the containerType value. - */ - public ContainerType containerType() { - return this.containerType; - } - - /** - * Set the containerType property: The type of container to retrieve logs from. - * - * @param containerType the containerType value to set. - * @return the DeploymentLogsRequest object itself. - */ - public DeploymentLogsRequest withContainerType(ContainerType containerType) { - this.containerType = containerType; - return this; - } - - /** - * Get the tail property: The maximum number of lines to tail. - * - * @return the tail value. - */ - public Integer tail() { - return this.tail; - } - - /** - * Set the tail property: The maximum number of lines to tail. - * - * @param tail the tail value to set. - * @return the DeploymentLogsRequest object itself. - */ - public DeploymentLogsRequest withTail(Integer tail) { - this.tail = tail; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 1f8856ab72e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentProvisioningState.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; - -/** Possible values for DeploymentProvisioningState. */ -public final class DeploymentProvisioningState extends ExpandableStringEnum { - /** Static value Creating for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState DELETING = fromString("Deleting"); - - /** Static value Scaling for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState SCALING = fromString("Scaling"); - - /** Static value Updating for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState UPDATING = fromString("Updating"); - - /** Static value Succeeded for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for DeploymentProvisioningState. */ - public static final DeploymentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of DeploymentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeploymentProvisioningState() { - } - - /** - * Creates or finds a DeploymentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeploymentProvisioningState. - */ - @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/DeploymentResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.java deleted file mode 100644 index 652e1c26d99e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DeploymentResourceConfiguration.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.annotation.Fluent; -import java.util.Map; - -/** The DeploymentResourceConfiguration model. */ -@Fluent -public final class DeploymentResourceConfiguration extends ResourceConfiguration { - /** Creates an instance of DeploymentResourceConfiguration class. */ - public DeploymentResourceConfiguration() { - } - - /** {@inheritDoc} */ - @Override - public DeploymentResourceConfiguration withInstanceCount(Integer instanceCount) { - super.withInstanceCount(instanceCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public DeploymentResourceConfiguration withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** {@inheritDoc} */ - @Override - public DeploymentResourceConfiguration withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 cb9851aa8b82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseRequestProperties.java +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of DiagnoseRequestProperties class. */ - public DiagnoseRequestProperties() { - } - - /** - * Get the udr property: Setting for diagnosing user defined routing. - * - * @return the udr value. - */ - public Map udr() { - return this.udr; - } - - /** - * Set the udr property: Setting for diagnosing user defined routing. - * - * @param udr the udr value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withUdr(Map udr) { - this.udr = udr; - return this; - } - - /** - * Get the nsg property: Setting for diagnosing network security group. - * - * @return the nsg value. - */ - public Map nsg() { - return this.nsg; - } - - /** - * Set the nsg property: Setting for diagnosing network security group. - * - * @param nsg the nsg value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withNsg(Map nsg) { - this.nsg = nsg; - return this; - } - - /** - * Get the resourceLock property: Setting for diagnosing resource lock. - * - * @return the resourceLock value. - */ - public Map resourceLock() { - return this.resourceLock; - } - - /** - * Set the resourceLock property: Setting for diagnosing resource lock. - * - * @param resourceLock the resourceLock value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withResourceLock(Map resourceLock) { - this.resourceLock = resourceLock; - return this; - } - - /** - * Get the dnsResolution property: Setting for diagnosing dns resolution. - * - * @return the dnsResolution value. - */ - public Map dnsResolution() { - return this.dnsResolution; - } - - /** - * Set the dnsResolution property: Setting for diagnosing dns resolution. - * - * @param dnsResolution the dnsResolution value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withDnsResolution(Map dnsResolution) { - this.dnsResolution = dnsResolution; - return this; - } - - /** - * Get the storageAccount property: Setting for diagnosing dependent storage account. - * - * @return the storageAccount value. - */ - public Map storageAccount() { - return this.storageAccount; - } - - /** - * Set the storageAccount property: Setting for diagnosing dependent storage account. - * - * @param storageAccount the storageAccount value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withStorageAccount(Map storageAccount) { - this.storageAccount = storageAccount; - return this; - } - - /** - * Get the keyVault property: Setting for diagnosing dependent key vault. - * - * @return the keyVault value. - */ - public Map keyVault() { - return this.keyVault; - } - - /** - * Set the keyVault property: Setting for diagnosing dependent key vault. - * - * @param keyVault the keyVault value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withKeyVault(Map keyVault) { - this.keyVault = keyVault; - return this; - } - - /** - * Get the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @return the containerRegistry value. - */ - public Map containerRegistry() { - return this.containerRegistry; - } - - /** - * Set the containerRegistry property: Setting for diagnosing dependent container registry. - * - * @param containerRegistry the containerRegistry value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withContainerRegistry(Map containerRegistry) { - this.containerRegistry = containerRegistry; - return this; - } - - /** - * Get the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @return the applicationInsights value. - */ - public Map applicationInsights() { - return this.applicationInsights; - } - - /** - * Set the applicationInsights property: Setting for diagnosing dependent application insights. - * - * @param applicationInsights the applicationInsights value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withApplicationInsights(Map applicationInsights) { - this.applicationInsights = applicationInsights; - return this; - } - - /** - * Get the others property: Setting for diagnosing unclassified category of problems. - * - * @return the others value. - */ - public Map others() { - return this.others; - } - - /** - * Set the others property: Setting for diagnosing unclassified category of problems. - * - * @param others the others value to set. - * @return the DiagnoseRequestProperties object itself. - */ - public DiagnoseRequestProperties withOthers(Map others) { - this.others = others; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 403b22180639..000000000000 --- 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 81e242c0c4ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResponseResultValue.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; -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; - - /** Creates an instance of DiagnoseResponseResultValue class. */ - public DiagnoseResponseResultValue() { - } - - /** - * Get the userDefinedRouteResults property: The userDefinedRouteResults property. - * - * @return the userDefinedRouteResults value. - */ - public List userDefinedRouteResults() { - return this.userDefinedRouteResults; - } - - /** - * Set the userDefinedRouteResults property: The userDefinedRouteResults property. - * - * @param userDefinedRouteResults the userDefinedRouteResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withUserDefinedRouteResults(List userDefinedRouteResults) { - this.userDefinedRouteResults = userDefinedRouteResults; - return this; - } - - /** - * Get the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * - * @return the networkSecurityRuleResults value. - */ - public List networkSecurityRuleResults() { - return this.networkSecurityRuleResults; - } - - /** - * Set the networkSecurityRuleResults property: The networkSecurityRuleResults property. - * - * @param networkSecurityRuleResults the networkSecurityRuleResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withNetworkSecurityRuleResults(List networkSecurityRuleResults) { - this.networkSecurityRuleResults = networkSecurityRuleResults; - return this; - } - - /** - * Get the resourceLockResults property: The resourceLockResults property. - * - * @return the resourceLockResults value. - */ - public List resourceLockResults() { - return this.resourceLockResults; - } - - /** - * Set the resourceLockResults property: The resourceLockResults property. - * - * @param resourceLockResults the resourceLockResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withResourceLockResults(List resourceLockResults) { - this.resourceLockResults = resourceLockResults; - return this; - } - - /** - * Get the dnsResolutionResults property: The dnsResolutionResults property. - * - * @return the dnsResolutionResults value. - */ - public List dnsResolutionResults() { - return this.dnsResolutionResults; - } - - /** - * Set the dnsResolutionResults property: The dnsResolutionResults property. - * - * @param dnsResolutionResults the dnsResolutionResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withDnsResolutionResults(List dnsResolutionResults) { - this.dnsResolutionResults = dnsResolutionResults; - return this; - } - - /** - * Get the storageAccountResults property: The storageAccountResults property. - * - * @return the storageAccountResults value. - */ - public List storageAccountResults() { - return this.storageAccountResults; - } - - /** - * Set the storageAccountResults property: The storageAccountResults property. - * - * @param storageAccountResults the storageAccountResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withStorageAccountResults(List storageAccountResults) { - this.storageAccountResults = storageAccountResults; - return this; - } - - /** - * Get the keyVaultResults property: The keyVaultResults property. - * - * @return the keyVaultResults value. - */ - public List keyVaultResults() { - return this.keyVaultResults; - } - - /** - * Set the keyVaultResults property: The keyVaultResults property. - * - * @param keyVaultResults the keyVaultResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withKeyVaultResults(List keyVaultResults) { - this.keyVaultResults = keyVaultResults; - return this; - } - - /** - * Get the containerRegistryResults property: The containerRegistryResults property. - * - * @return the containerRegistryResults value. - */ - public List containerRegistryResults() { - return this.containerRegistryResults; - } - - /** - * Set the containerRegistryResults property: The containerRegistryResults property. - * - * @param containerRegistryResults the containerRegistryResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withContainerRegistryResults(List containerRegistryResults) { - this.containerRegistryResults = containerRegistryResults; - return this; - } - - /** - * Get the applicationInsightsResults property: The applicationInsightsResults property. - * - * @return the applicationInsightsResults value. - */ - public List applicationInsightsResults() { - return this.applicationInsightsResults; - } - - /** - * Set the applicationInsightsResults property: The applicationInsightsResults property. - * - * @param applicationInsightsResults the applicationInsightsResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withApplicationInsightsResults(List applicationInsightsResults) { - this.applicationInsightsResults = applicationInsightsResults; - return this; - } - - /** - * Get the otherResults property: The otherResults property. - * - * @return the otherResults value. - */ - public List otherResults() { - return this.otherResults; - } - - /** - * Set the otherResults property: The otherResults property. - * - * @param otherResults the otherResults value to set. - * @return the DiagnoseResponseResultValue object itself. - */ - public DiagnoseResponseResultValue withOtherResults(List otherResults) { - this.otherResults = otherResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (userDefinedRouteResults() != null) { - userDefinedRouteResults().forEach(e -> e.validate()); - } - if (networkSecurityRuleResults() != null) { - networkSecurityRuleResults().forEach(e -> e.validate()); - } - if (resourceLockResults() != null) { - resourceLockResults().forEach(e -> e.validate()); - } - if (dnsResolutionResults() != null) { - dnsResolutionResults().forEach(e -> e.validate()); - } - if (storageAccountResults() != null) { - storageAccountResults().forEach(e -> e.validate()); - } - if (keyVaultResults() != null) { - keyVaultResults().forEach(e -> e.validate()); - } - if (containerRegistryResults() != null) { - containerRegistryResults().forEach(e -> e.validate()); - } - if (applicationInsightsResults() != null) { - applicationInsightsResults().forEach(e -> e.validate()); - } - if (otherResults() != null) { - otherResults().forEach(e -> e.validate()); - } - } -} 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 f7eb4471ab30..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResult.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of DiagnoseResult class. */ - public DiagnoseResult() { - } - - /** - * Get the code property: Code for workspace setup error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the level property: Level of workspace setup error. - * - * @return the level value. - */ - public DiagnoseResultLevel level() { - return this.level; - } - - /** - * Get the message property: Message of workspace setup error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 fe22e4e3f9f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseResultLevel.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; - -/** Level of workspace setup error. */ -public final class DiagnoseResultLevel extends ExpandableStringEnum { - /** Static value Warning for DiagnoseResultLevel. */ - public static final DiagnoseResultLevel WARNING = fromString("Warning"); - - /** Static value Error for DiagnoseResultLevel. */ - public static final DiagnoseResultLevel ERROR = fromString("Error"); - - /** Static value Information for DiagnoseResultLevel. */ - public static final DiagnoseResultLevel INFORMATION = fromString("Information"); - - /** - * Creates a new instance of DiagnoseResultLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DiagnoseResultLevel() { - } - - /** - * Creates or finds a DiagnoseResultLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding DiagnoseResultLevel. - */ - @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 f0a37ececc46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DiagnoseWorkspaceParameters.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.fasterxml.jackson.annotation.JsonProperty; - -/** Parameters to diagnose a workspace. */ -@Fluent -public final class DiagnoseWorkspaceParameters { - /* - * Value of Parameters - */ - @JsonProperty(value = "value") - private DiagnoseRequestProperties value; - - /** Creates an instance of DiagnoseWorkspaceParameters class. */ - public DiagnoseWorkspaceParameters() { - } - - /** - * Get the value property: Value of Parameters. - * - * @return the value value. - */ - public DiagnoseRequestProperties value() { - return this.value; - } - - /** - * Set the value property: Value of Parameters. - * - * @param value the value value to set. - * @return the DiagnoseWorkspaceParameters object itself. - */ - public DiagnoseWorkspaceParameters withValue(DiagnoseRequestProperties value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().validate(); - } - } -} 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 059ddfa4210a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionConfiguration.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 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 { - /** Creates an instance of DistributionConfiguration class. */ - public 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 79c7b8c646ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/DistributionType.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; - -/** Enum to determine the job distribution type. */ -public final class DistributionType extends ExpandableStringEnum { - /** Static value PyTorch for DistributionType. */ - public static final DistributionType PY_TORCH = fromString("PyTorch"); - - /** Static value TensorFlow for DistributionType. */ - public static final DistributionType TENSOR_FLOW = fromString("TensorFlow"); - - /** Static value Mpi for DistributionType. */ - public static final DistributionType MPI = fromString("Mpi"); - - /** - * Creates a new instance of DistributionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DistributionType() { - } - - /** - * Creates or finds a DistributionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DistributionType. - */ - @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 213796629764..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicy.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of EarlyTerminationPolicy class. */ - public EarlyTerminationPolicy() { - } - - /** - * 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 1ab6e1510118..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EarlyTerminationPolicyType.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 EarlyTerminationPolicyType. */ -public final class EarlyTerminationPolicyType extends ExpandableStringEnum { - /** Static value Bandit for EarlyTerminationPolicyType. */ - public static final EarlyTerminationPolicyType BANDIT = fromString("Bandit"); - - /** Static value MedianStopping for EarlyTerminationPolicyType. */ - public static final EarlyTerminationPolicyType MEDIAN_STOPPING = fromString("MedianStopping"); - - /** Static value TruncationSelection for EarlyTerminationPolicyType. */ - public static final EarlyTerminationPolicyType TRUNCATION_SELECTION = fromString("TruncationSelection"); - - /** - * Creates a new instance of EarlyTerminationPolicyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EarlyTerminationPolicyType() { - } - - /** - * Creates or finds a EarlyTerminationPolicyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EarlyTerminationPolicyType. - */ - @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 e19a06ff3f63..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EgressPublicNetworkAccessType.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; - -/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment. */ -public final class EgressPublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for EgressPublicNetworkAccessType. */ - public static final EgressPublicNetworkAccessType ENABLED = fromString("Enabled"); - - /** Static value Disabled for EgressPublicNetworkAccessType. */ - public static final EgressPublicNetworkAccessType DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of EgressPublicNetworkAccessType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EgressPublicNetworkAccessType() { - } - - /** - * Creates or finds a EgressPublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EgressPublicNetworkAccessType. - */ - @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 b5dece8ac6ee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionKeyVaultProperties.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; - -/** 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; - - /** Creates an instance of EncryptionKeyVaultProperties class. */ - public EncryptionKeyVaultProperties() { - } - - /** - * Get the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @return the keyVaultArmId value. - */ - public String keyVaultArmId() { - return this.keyVaultArmId; - } - - /** - * Set the keyVaultArmId property: The ArmId of the keyVault where the customer owned encryption key is present. - * - * @param keyVaultArmId the keyVaultArmId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyVaultArmId(String keyVaultArmId) { - this.keyVaultArmId = keyVaultArmId; - return this; - } - - /** - * Get the keyIdentifier property: Key vault uri to access the encryption key. - * - * @return the keyIdentifier value. - */ - public String keyIdentifier() { - return this.keyIdentifier; - } - - /** - * Set the keyIdentifier property: Key vault uri to access the encryption key. - * - * @param keyIdentifier the keyIdentifier value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withKeyIdentifier(String keyIdentifier) { - this.keyIdentifier = keyIdentifier; - return this; - } - - /** - * Get the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @return the identityClientId value. - */ - public String identityClientId() { - return this.identityClientId; - } - - /** - * Set the identityClientId property: For future use - The client id of the identity which will be used to access - * key vault. - * - * @param identityClientId the identityClientId value to set. - * @return the EncryptionKeyVaultProperties object itself. - */ - public EncryptionKeyVaultProperties withIdentityClientId(String identityClientId) { - this.identityClientId = identityClientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyVaultArmId() == null) { - throw LOGGER - .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 a56f01ee36e6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionProperty.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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; - - /** Creates an instance of EncryptionProperty class. */ - public EncryptionProperty() { - } - - /** - * Get the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @return the status value. - */ - public EncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether or not the encryption is enabled for the workspace. - * - * @param status the status value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withStatus(EncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Get the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @return the identity value. - */ - public IdentityForCmk identity() { - return this.identity; - } - - /** - * Set the identity property: The identity that will be used to access the key vault for encryption at rest. - * - * @param identity the identity value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withIdentity(IdentityForCmk identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyVaultProperties property: Customer Key vault properties. - * - * @return the keyVaultProperties value. - */ - public EncryptionKeyVaultProperties keyVaultProperties() { - return this.keyVaultProperties; - } - - /** - * Set the keyVaultProperties property: Customer Key vault properties. - * - * @param keyVaultProperties the keyVaultProperties value to set. - * @return the EncryptionProperty object itself. - */ - public EncryptionProperty withKeyVaultProperties(EncryptionKeyVaultProperties keyVaultProperties) { - this.keyVaultProperties = keyVaultProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (status() == null) { - throw LOGGER - .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 abfb234a26af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EncryptionStatus.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; - -/** Indicates whether or not the encryption is enabled for the workspace. */ -public final class EncryptionStatus extends ExpandableStringEnum { - /** Static value Enabled for EncryptionStatus. */ - public static final EncryptionStatus ENABLED = fromString("Enabled"); - - /** Static value Disabled for EncryptionStatus. */ - public static final EncryptionStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of EncryptionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EncryptionStatus() { - } - - /** - * Creates or finds a EncryptionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding EncryptionStatus. - */ - @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 0d6b4eba1bf5..000000000000 --- 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 c52e770ee18d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointAuthMode.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; - -/** Enum to determine endpoint authentication mode. */ -public final class EndpointAuthMode extends ExpandableStringEnum { - /** Static value AMLToken for EndpointAuthMode. */ - public static final EndpointAuthMode AMLTOKEN = fromString("AMLToken"); - - /** Static value Key for EndpointAuthMode. */ - public static final EndpointAuthMode KEY = fromString("Key"); - - /** Static value AADToken for EndpointAuthMode. */ - public static final EndpointAuthMode AADTOKEN = fromString("AADToken"); - - /** - * Creates a new instance of EndpointAuthMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointAuthMode() { - } - - /** - * Creates or finds a EndpointAuthMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointAuthMode. - */ - @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 327ea7b62a73..000000000000 --- 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 e80c9ec955cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointComputeType.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; - -/** Enum to determine endpoint compute type. */ -public final class EndpointComputeType extends ExpandableStringEnum { - /** Static value Managed for EndpointComputeType. */ - public static final EndpointComputeType MANAGED = fromString("Managed"); - - /** Static value Kubernetes for EndpointComputeType. */ - public static final EndpointComputeType KUBERNETES = fromString("Kubernetes"); - - /** Static value AzureMLCompute for EndpointComputeType. */ - public static final EndpointComputeType AZURE_MLCOMPUTE = fromString("AzureMLCompute"); - - /** - * Creates a new instance of EndpointComputeType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointComputeType() { - } - - /** - * Creates or finds a EndpointComputeType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointComputeType. - */ - @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 9f210ec5de03..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointDeploymentPropertiesBase.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.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 or AssetId 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; - - /** Creates an instance of EndpointDeploymentPropertiesBase class. */ - public EndpointDeploymentPropertiesBase() { - } - - /** - * 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 or AssetId of the environment specification for the endpoint - * deployment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: ARM resource ID or AssetId of the environment specification for the endpoint - * deployment. - * - * @param environmentId the environmentId value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the environmentVariables property: Environment variables configuration for the deployment. - * - * @return the environmentVariables value. - */ - public Map environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: Environment variables configuration for the deployment. - * - * @param environmentVariables the environmentVariables value to set. - * @return the EndpointDeploymentPropertiesBase object itself. - */ - public EndpointDeploymentPropertiesBase withEnvironmentVariables(Map environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * 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 0251403b9fe8..000000000000 --- 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 01be8b4cabf3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointProvisioningState.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** State of endpoint provisioning. */ -public final class EndpointProvisioningState extends ExpandableStringEnum { - /** Static value Creating for EndpointProvisioningState. */ - public static final EndpointProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for EndpointProvisioningState. */ - public static final EndpointProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for EndpointProvisioningState. */ - public static final EndpointProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for EndpointProvisioningState. */ - public static final EndpointProvisioningState FAILED = fromString("Failed"); - - /** Static value Updating for EndpointProvisioningState. */ - public static final EndpointProvisioningState UPDATING = fromString("Updating"); - - /** Static value Canceled for EndpointProvisioningState. */ - public static final EndpointProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of EndpointProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EndpointProvisioningState() { - } - - /** - * Creates or finds a EndpointProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EndpointProvisioningState. - */ - @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/EndpointScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.java deleted file mode 100644 index 1fc068802e76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EndpointScheduleAction.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.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The EndpointScheduleAction model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") -@JsonTypeName("InvokeBatchEndpoint") -@Fluent -public final class EndpointScheduleAction extends ScheduleActionBase { - /* - * [Required] Defines Schedule action definition details. - * - */ - @JsonProperty(value = "endpointInvocationDefinition", required = true) - private Object endpointInvocationDefinition; - - /** Creates an instance of EndpointScheduleAction class. */ - public EndpointScheduleAction() { - } - - /** - * Get the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see - * href="TBD" />. - * - * @return the endpointInvocationDefinition value. - */ - public Object endpointInvocationDefinition() { - return this.endpointInvocationDefinition; - } - - /** - * Set the endpointInvocationDefinition property: [Required] Defines Schedule action definition details. <see - * href="TBD" />. - * - * @param endpointInvocationDefinition the endpointInvocationDefinition value to set. - * @return the EndpointScheduleAction object itself. - */ - public EndpointScheduleAction withEndpointInvocationDefinition(Object endpointInvocationDefinition) { - this.endpointInvocationDefinition = endpointInvocationDefinition; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (endpointInvocationDefinition() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property endpointInvocationDefinition in model EndpointScheduleAction")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EndpointScheduleAction.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.java deleted file mode 100644 index 0256e791b224..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainer.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.EnvironmentContainerInner; - -/** An immutable client-side representation of EnvironmentContainer. */ -public interface EnvironmentContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - EnvironmentContainerProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner object. - * - * @return the inner object. - */ - EnvironmentContainerInner innerModel(); - - /** The entirety of the EnvironmentContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The EnvironmentContainer definition stages. */ - interface DefinitionStages { - /** The first stage of the EnvironmentContainer definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the EnvironmentContainer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the EnvironmentContainer definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(EnvironmentContainerProperties properties); - } - /** - * The stage of the EnvironmentContainer definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - EnvironmentContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentContainer create(Context context); - } - } - /** - * Begins update for the EnvironmentContainer resource. - * - * @return the stage of resource update. - */ - EnvironmentContainer.Update update(); - - /** The template for EnvironmentContainer update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentContainer apply(Context context); - } - /** The EnvironmentContainer update stages. */ - interface UpdateStages { - /** The stage of the EnvironmentContainer update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(EnvironmentContainerProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.java deleted file mode 100644 index 772621f9cc4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerProperties.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 java.util.Map; - -/** Container for environment specification versions. */ -@Fluent -public final class EnvironmentContainerProperties extends AssetContainer { - /** Creates an instance of EnvironmentContainerProperties class. */ - public EnvironmentContainerProperties() { - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentContainerProperties 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 80da987c4f2f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -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; - - /** Creates an instance of EnvironmentContainerResourceArmPaginatedResult class. */ - public EnvironmentContainerResourceArmPaginatedResult() { - } - - /** - * 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 a78c04678f4d..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - EnvironmentContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - EnvironmentContainer getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentContainer resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentContainer definition. - */ - EnvironmentContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.java deleted file mode 100644 index f500324ca53a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentType.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; - -/** Environment type is either user created or curated by Azure ML service. */ -public final class EnvironmentType extends ExpandableStringEnum { - /** Static value Curated for EnvironmentType. */ - public static final EnvironmentType CURATED = fromString("Curated"); - - /** Static value UserCreated for EnvironmentType. */ - public static final EnvironmentType USER_CREATED = fromString("UserCreated"); - - /** - * Creates a new instance of EnvironmentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EnvironmentType() { - } - - /** - * Creates or finds a EnvironmentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentType. - */ - @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/EnvironmentVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.java deleted file mode 100644 index 8c72da86c8b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersion.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.EnvironmentVersionInner; - -/** An immutable client-side representation of EnvironmentVersion. */ -public interface EnvironmentVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - EnvironmentVersionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner object. - * - * @return the inner object. - */ - EnvironmentVersionInner innerModel(); - - /** The entirety of the EnvironmentVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The EnvironmentVersion definition stages. */ - interface DefinitionStages { - /** The first stage of the EnvironmentVersion definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the EnvironmentVersion definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Name of EnvironmentVersion. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingEnvironment(String resourceGroupName, String workspaceName, String name); - } - /** The stage of the EnvironmentVersion definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(EnvironmentVersionProperties properties); - } - /** - * The stage of the EnvironmentVersion definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - EnvironmentVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - EnvironmentVersion create(Context context); - } - } - /** - * Begins update for the EnvironmentVersion resource. - * - * @return the stage of resource update. - */ - EnvironmentVersion.Update update(); - - /** The template for EnvironmentVersion update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - EnvironmentVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - EnvironmentVersion apply(Context context); - } - /** The EnvironmentVersion update stages. */ - interface UpdateStages { - /** The stage of the EnvironmentVersion update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(EnvironmentVersionProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - EnvironmentVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - EnvironmentVersion refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java deleted file mode 100644 index 97f7ff920893..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionProperties.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Environment version details. */ -@Fluent -public final class EnvironmentVersionProperties extends AssetBase { - /* - * Defines if image needs to be rebuilt based on base image changes. - */ - @JsonProperty(value = "autoRebuild") - private AutoRebuildSetting autoRebuild; - - /* - * 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; - - /** Creates an instance of EnvironmentVersionProperties class. */ - public EnvironmentVersionProperties() { - } - - /** - * Get the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * - * @return the autoRebuild value. - */ - public AutoRebuildSetting autoRebuild() { - return this.autoRebuild; - } - - /** - * Set the autoRebuild property: Defines if image needs to be rebuilt based on base image changes. - * - * @param autoRebuild the autoRebuild value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withAutoRebuild(AutoRebuildSetting autoRebuild) { - this.autoRebuild = autoRebuild; - return this; - } - - /** - * Get the build property: Configuration settings for Docker build context. - * - * @return the build value. - */ - public BuildContext build() { - return this.build; - } - - /** - * Set the build property: Configuration settings for Docker build context. - * - * @param build the build value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withBuild(BuildContext build) { - this.build = build; - return this; - } - - /** - * Get the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. <see - * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" - * />. - * - * @return the condaFile value. - */ - public String condaFile() { - return this.condaFile; - } - - /** - * Set the condaFile property: Standard configuration file used by Conda that lets you install any kind of package, - * including Python, R, and C/C++ packages. <see - * href="https://repo2docker.readthedocs.io/en/latest/config_files.html#environment-yml-install-a-conda-environment" - * />. - * - * @param condaFile the condaFile value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withCondaFile(String condaFile) { - this.condaFile = condaFile; - return this; - } - - /** - * Get the environmentType property: Environment type is either user managed or curated by the Azure ML service - * <see href="https://docs.microsoft.com/en-us/azure/machine-learning/resource-curated-environments" />. - * - * @return the environmentType value. - */ - public EnvironmentType environmentType() { - return this.environmentType; - } - - /** - * Get the image property: Name of the image that will be used for the environment. <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning" - + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Name of the image that will be used for the environment. <seealso - * href="https://docs.microsoft.com/en-us/azure/machine-learning" - + "/how-to-deploy-custom-docker-image#use-a-custom-base-image" - * />. - * - * @param image the image value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the inferenceConfig property: Defines configuration specific to inference. - * - * @return the inferenceConfig value. - */ - public InferenceContainerProperties inferenceConfig() { - return this.inferenceConfig; - } - - /** - * Set the inferenceConfig property: Defines configuration specific to inference. - * - * @param inferenceConfig the inferenceConfig value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withInferenceConfig(InferenceContainerProperties inferenceConfig) { - this.inferenceConfig = inferenceConfig; - return this; - } - - /** - * Get the osType property: The OS type of the environment. - * - * @return the osType value. - */ - public OperatingSystemType osType() { - return this.osType; - } - - /** - * Set the osType property: The OS type of the environment. - * - * @param osType the osType value to set. - * @return the EnvironmentVersionProperties object itself. - */ - public EnvironmentVersionProperties withOsType(OperatingSystemType osType) { - this.osType = osType; - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public EnvironmentVersionProperties 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 a0c6920ca097..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EnvironmentVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -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; - - /** Creates an instance of EnvironmentVersionResourceArmPaginatedResult class. */ - public EnvironmentVersionResourceArmPaginatedResult() { - } - - /** - * 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 42d2c7095879..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - EnvironmentVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - EnvironmentVersion getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new EnvironmentVersion resource. - * - * @param name resource name. - * @return the first stage of the new EnvironmentVersion definition. - */ - EnvironmentVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java deleted file mode 100644 index a4fe18a7395d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrice.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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; - - /** Creates an instance of EstimatedVMPrice class. */ - public EstimatedVMPrice() { - } - - /** - * 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 577bbbb091f9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/EstimatedVMPrices.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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; - - /** Creates an instance of EstimatedVMPrices class. */ - public EstimatedVMPrices() { - } - - /** - * 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 6483d490175f..000000000000 --- 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 a20e4611f93e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeatureLags.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; - -/** Flag for generating lags for the numeric features. */ -public final class FeatureLags extends ExpandableStringEnum { - /** Static value None for FeatureLags. */ - public static final FeatureLags NONE = fromString("None"); - - /** Static value Auto for FeatureLags. */ - public static final FeatureLags AUTO = fromString("Auto"); - - /** - * Creates a new instance of FeatureLags value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeatureLags() { - } - - /** - * Creates or finds a FeatureLags from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeatureLags. - */ - @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 8ca6e116bb44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationMode.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; - -/** Featurization mode - determines data featurization mode. */ -public final class FeaturizationMode extends ExpandableStringEnum { - /** Static value Auto for FeaturizationMode. */ - public static final FeaturizationMode AUTO = fromString("Auto"); - - /** Static value Custom for FeaturizationMode. */ - public static final FeaturizationMode CUSTOM = fromString("Custom"); - - /** Static value Off for FeaturizationMode. */ - public static final FeaturizationMode OFF = fromString("Off"); - - /** - * Creates a new instance of FeaturizationMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public FeaturizationMode() { - } - - /** - * Creates or finds a FeaturizationMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeaturizationMode. - */ - @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 49b68df8ae44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FeaturizationSettings.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; - -/** Featurization Configuration. */ -@Fluent -public class FeaturizationSettings { - /* - * Dataset language, useful for the text data. - */ - @JsonProperty(value = "datasetLanguage") - private String datasetLanguage; - - /** Creates an instance of FeaturizationSettings class. */ - public FeaturizationSettings() { - } - - /** - * Get the datasetLanguage property: Dataset language, useful for the text data. - * - * @return the datasetLanguage value. - */ - public String datasetLanguage() { - return this.datasetLanguage; - } - - /** - * Set the datasetLanguage property: Dataset language, useful for the text data. - * - * @param datasetLanguage the datasetLanguage value to set. - * @return the FeaturizationSettings object itself. - */ - public FeaturizationSettings withDatasetLanguage(String datasetLanguage) { - this.datasetLanguage = datasetLanguage; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 24c41610e553..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FlavorData.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.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; - - /** Creates an instance of FlavorData class. */ - public FlavorData() { - } - - /** - * Get the data property: Model flavor-specific data. - * - * @return the data value. - */ - public Map data() { - return this.data; - } - - /** - * Set the data property: Model flavor-specific data. - * - * @param data the data value to set. - * @return the FlavorData object itself. - */ - public FlavorData withData(Map data) { - this.data = data; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 6bb995553e44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizon.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.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 { - /** Creates an instance of ForecastHorizon class. */ - public 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 f1a66b8d5fb6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastHorizonMode.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; - -/** Enum to determine forecast horizon selection mode. */ -public final class ForecastHorizonMode extends ExpandableStringEnum { - /** Static value Auto for ForecastHorizonMode. */ - public static final ForecastHorizonMode AUTO = fromString("Auto"); - - /** Static value Custom for ForecastHorizonMode. */ - public static final ForecastHorizonMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of ForecastHorizonMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastHorizonMode() { - } - - /** - * Creates or finds a ForecastHorizonMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastHorizonMode. - */ - @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 0f9bf8e05d7e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Forecasting.java +++ /dev/null @@ -1,399 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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 { - /* - * Forecasting task specific inputs. - */ - @JsonProperty(value = "forecastingSettings") - private ForecastingSettings forecastingSettings; - - /* - * Primary metric for forecasting task. - */ - @JsonProperty(value = "primaryMetric") - private ForecastingPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private ForecastingTrainingSettings trainingSettings; - - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private MLTableJobInput testData; - - /* - * 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /* - * 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; - - /** Creates an instance of Forecasting class. */ - public Forecasting() { - } - - /** - * 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 trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public ForecastingTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTrainingSettings(ForecastingTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Forecasting object itself. - */ - public Forecasting withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the 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 nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Forecasting object itself. - */ - public Forecasting withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Forecasting object itself. - */ - public Forecasting withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Forecasting object itself. - */ - public Forecasting withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Forecasting object itself. - */ - public Forecasting withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Forecasting object itself. - */ - public Forecasting withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** {@inheritDoc} */ - @Override - public Forecasting withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public Forecasting withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public Forecasting withTrainingData(MLTableJobInput 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 (forecastingSettings() != null) { - forecastingSettings().validate(); - } - if (trainingSettings() != null) { - trainingSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (validationData() != null) { - validationData().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 d75b3fdec7a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingModels.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enum for all forecasting models supported by AutoML. */ -public final class ForecastingModels extends ExpandableStringEnum { - /** Static value AutoArima for ForecastingModels. */ - public static final ForecastingModels AUTO_ARIMA = fromString("AutoArima"); - - /** Static value Prophet for ForecastingModels. */ - public static final ForecastingModels PROPHET = fromString("Prophet"); - - /** Static value Naive for ForecastingModels. */ - public static final ForecastingModels NAIVE = fromString("Naive"); - - /** Static value SeasonalNaive for ForecastingModels. */ - public static final ForecastingModels SEASONAL_NAIVE = fromString("SeasonalNaive"); - - /** Static value Average for ForecastingModels. */ - public static final ForecastingModels AVERAGE = fromString("Average"); - - /** Static value SeasonalAverage for ForecastingModels. */ - public static final ForecastingModels SEASONAL_AVERAGE = fromString("SeasonalAverage"); - - /** Static value ExponentialSmoothing for ForecastingModels. */ - public static final ForecastingModels EXPONENTIAL_SMOOTHING = fromString("ExponentialSmoothing"); - - /** Static value Arimax for ForecastingModels. */ - public static final ForecastingModels ARIMAX = fromString("Arimax"); - - /** Static value TCNForecaster for ForecastingModels. */ - public static final ForecastingModels TCNFORECASTER = fromString("TCNForecaster"); - - /** Static value ElasticNet for ForecastingModels. */ - public static final ForecastingModels ELASTIC_NET = fromString("ElasticNet"); - - /** Static value GradientBoosting for ForecastingModels. */ - public static final ForecastingModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** Static value DecisionTree for ForecastingModels. */ - public static final ForecastingModels DECISION_TREE = fromString("DecisionTree"); - - /** Static value KNN for ForecastingModels. */ - public static final ForecastingModels KNN = fromString("KNN"); - - /** Static value LassoLars for ForecastingModels. */ - public static final ForecastingModels LASSO_LARS = fromString("LassoLars"); - - /** Static value SGD for ForecastingModels. */ - public static final ForecastingModels SGD = fromString("SGD"); - - /** Static value RandomForest for ForecastingModels. */ - public static final ForecastingModels RANDOM_FOREST = fromString("RandomForest"); - - /** Static value ExtremeRandomTrees for ForecastingModels. */ - public static final ForecastingModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** Static value LightGBM for ForecastingModels. */ - public static final ForecastingModels LIGHT_GBM = fromString("LightGBM"); - - /** Static value XGBoostRegressor for ForecastingModels. */ - public static final ForecastingModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); - - /** - * Creates a new instance of ForecastingModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastingModels() { - } - - /** - * Creates or finds a ForecastingModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingModels. - */ - @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 79f633ca4d44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingPrimaryMetrics.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Primary metrics for Forecasting task. */ -public final class ForecastingPrimaryMetrics extends ExpandableStringEnum { - /** Static value SpearmanCorrelation for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - - /** Static value NormalizedRootMeanSquaredError for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = - fromString("NormalizedRootMeanSquaredError"); - - /** Static value R2Score for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics R2SCORE = fromString("R2Score"); - - /** Static value NormalizedMeanAbsoluteError for ForecastingPrimaryMetrics. */ - public static final ForecastingPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = - fromString("NormalizedMeanAbsoluteError"); - - /** - * Creates a new instance of ForecastingPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ForecastingPrimaryMetrics() { - } - - /** - * Creates or finds a ForecastingPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ForecastingPrimaryMetrics. - */ - @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 b611d6da822a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingSettings.java +++ /dev/null @@ -1,408 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /** Creates an instance of ForecastingSettings class. */ - public ForecastingSettings() { - } - - /** - * Get the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. These should - * be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * - * @return the countryOrRegionForHolidays value. - */ - public String countryOrRegionForHolidays() { - return this.countryOrRegionForHolidays; - } - - /** - * Set the countryOrRegionForHolidays property: Country or region for holidays for forecasting tasks. These should - * be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. - * - * @param countryOrRegionForHolidays the countryOrRegionForHolidays value to set. - * @return the ForecastingSettings object itself. - */ - public ForecastingSettings withCountryOrRegionForHolidays(String countryOrRegionForHolidays) { - this.countryOrRegionForHolidays = countryOrRegionForHolidays; - return this; - } - - /** - * Get the 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/ForecastingTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java deleted file mode 100644 index baf43d0f6fbf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ForecastingTrainingSettings.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.util.List; - -/** Forecasting Training related configuration. */ -@Fluent -public final class ForecastingTrainingSettings extends TrainingSettings { - /* - * Allowed models for forecasting task. - */ - @JsonProperty(value = "allowedTrainingAlgorithms") - private List allowedTrainingAlgorithms; - - /* - * Blocked models for forecasting task. - */ - @JsonProperty(value = "blockedTrainingAlgorithms") - private List blockedTrainingAlgorithms; - - /** Creates an instance of ForecastingTrainingSettings class. */ - public ForecastingTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for forecasting task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the ForecastingTrainingSettings object itself. - */ - public ForecastingTrainingSettings withAllowedTrainingAlgorithms( - List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for forecasting task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the ForecastingTrainingSettings object itself. - */ - public ForecastingTrainingSettings withBlockedTrainingAlgorithms( - List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** {@inheritDoc} */ - @Override - public ForecastingTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - 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/FqdnEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.java deleted file mode 100644 index f5da7736f78c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoint.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 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; - - /** Creates an instance of FqdnEndpoint class. */ - public FqdnEndpoint() { - } - - /** - * Get the domainName property: The domainName property. - * - * @return the domainName value. - */ - public String domainName() { - return this.domainName; - } - - /** - * Set the domainName property: The domainName property. - * - * @param domainName the domainName value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withDomainName(String domainName) { - this.domainName = domainName; - return this; - } - - /** - * Get the endpointDetails property: The endpointDetails property. - * - * @return the endpointDetails value. - */ - public List endpointDetails() { - return this.endpointDetails; - } - - /** - * Set the endpointDetails property: The endpointDetails property. - * - * @param endpointDetails the endpointDetails value to set. - * @return the FqdnEndpoint object itself. - */ - public FqdnEndpoint withEndpointDetails(List endpointDetails) { - this.endpointDetails = endpointDetails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpointDetails() != null) { - endpointDetails().forEach(e -> e.validate()); - } - } -} 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 e2b5c5930b28..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointDetail.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; - -/** The FqdnEndpointDetail model. */ -@Fluent -public final class FqdnEndpointDetail { - /* - * The port property. - */ - @JsonProperty(value = "port") - private Integer port; - - /** Creates an instance of FqdnEndpointDetail class. */ - public FqdnEndpointDetail() { - } - - /** - * Get the port property: The port property. - * - * @return the port value. - */ - public Integer port() { - return this.port; - } - - /** - * Set the port property: The port property. - * - * @param port the port value to set. - * @return the FqdnEndpointDetail object itself. - */ - public FqdnEndpointDetail withPort(Integer port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 e858af2ff001..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpoints.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.fasterxml.jackson.annotation.JsonProperty; - -/** The FqdnEndpoints model. */ -@Fluent -public final class FqdnEndpoints { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private FqdnEndpointsProperties properties; - - /** Creates an instance of FqdnEndpoints class. */ - public FqdnEndpoints() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public FqdnEndpointsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the FqdnEndpoints object itself. - */ - public FqdnEndpoints withProperties(FqdnEndpointsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 6cf5fe68fb94..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/FqdnEndpointsProperties.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 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; - - /** Creates an instance of FqdnEndpointsProperties class. */ - public FqdnEndpointsProperties() { - } - - /** - * Get the category property: The category property. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: The category property. - * - * @param category the category value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the endpoints property: The endpoints property. - * - * @return the endpoints value. - */ - public List endpoints() { - return this.endpoints; - } - - /** - * Set the endpoints property: The endpoints property. - * - * @param endpoints the endpoints value to set. - * @return the FqdnEndpointsProperties object itself. - */ - public FqdnEndpointsProperties withEndpoints(List endpoints) { - this.endpoints = endpoints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (endpoints() != null) { - endpoints().forEach(e -> e.validate()); - } - } -} 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 713752422010..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Goal.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 supported metric goals for hyperparameter tuning. */ -public final class Goal extends ExpandableStringEnum { - /** Static value Minimize for Goal. */ - public static final Goal MINIMIZE = fromString("Minimize"); - - /** Static value Maximize for Goal. */ - public static final Goal MAXIMIZE = fromString("Maximize"); - - /** - * Creates a new instance of Goal value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Goal() { - } - - /** - * Creates or finds a Goal from its string representation. - * - * @param name a name to look for. - * @return the corresponding Goal. - */ - @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 1e60d81c65f4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/GridSamplingAlgorithm.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.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 { - /** Creates an instance of GridSamplingAlgorithm class. */ - public GridSamplingAlgorithm() { - } - - /** - * 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 c5e63988ce74..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsight.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of HDInsight class. */ - public HDInsight() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public HDInsight withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 bc6f0165cefe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightProperties.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; - -/** 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; - - /** Creates an instance of HDInsightProperties class. */ - public HDInsightProperties() { - } - - /** - * Get the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections on the master node of the cluster. - * - * @param sshPort the sshPort value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the address property: Public IP address of the master node of the cluster. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the master node of the cluster. - * - * @param address the address value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for master node of the cluster. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for master node of the cluster. - * - * @param administratorAccount the administratorAccount value to set. - * @return the HDInsightProperties object itself. - */ - public HDInsightProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} 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 cd4faac3dfc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/HDInsightSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The HDInsightSchema model. */ -@Fluent -public class HDInsightSchema { - /* - * HDInsight compute properties - */ - @JsonProperty(value = "properties") - private HDInsightProperties properties; - - /** Creates an instance of HDInsightSchema class. */ - public HDInsightSchema() { - } - - /** - * Get the properties property: HDInsight compute properties. - * - * @return the properties value. - */ - public HDInsightProperties properties() { - return this.properties; - } - - /** - * Set the properties property: HDInsight compute properties. - * - * @param properties the properties value to set. - * @return the HDInsightSchema object itself. - */ - public HDInsightSchema withProperties(HDInsightProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 2ed4fa9fd76c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdAssetReference.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.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; - - /** Creates an instance of IdAssetReference class. */ - public IdAssetReference() { - } - - /** - * 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 c0a1ddcffc39..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfiguration.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 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 { - /** Creates an instance of IdentityConfiguration class. */ - public 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 34e201558211..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityConfigurationType.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; - -/** Enum to determine identity framework. */ -public final class IdentityConfigurationType extends ExpandableStringEnum { - /** Static value Managed for IdentityConfigurationType. */ - public static final IdentityConfigurationType MANAGED = fromString("Managed"); - - /** Static value AMLToken for IdentityConfigurationType. */ - public static final IdentityConfigurationType AMLTOKEN = fromString("AMLToken"); - - /** Static value UserIdentity for IdentityConfigurationType. */ - public static final IdentityConfigurationType USER_IDENTITY = fromString("UserIdentity"); - - /** - * Creates a new instance of IdentityConfigurationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IdentityConfigurationType() { - } - - /** - * Creates or finds a IdentityConfigurationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding IdentityConfigurationType. - */ - @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 9e86918bfd7a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/IdentityForCmk.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; - -/** 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; - - /** Creates an instance of IdentityForCmk class. */ - public IdentityForCmk() { - } - - /** - * Get the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @return the userAssignedIdentity value. - */ - public String userAssignedIdentity() { - return this.userAssignedIdentity; - } - - /** - * Set the userAssignedIdentity property: The ArmId of the user assigned identity that will be used to access the - * customer managed key vault. - * - * @param userAssignedIdentity the userAssignedIdentity value to set. - * @return the IdentityForCmk object itself. - */ - public IdentityForCmk withUserAssignedIdentity(String userAssignedIdentity) { - this.userAssignedIdentity = userAssignedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 96f4c3e36fb1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassification.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.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] 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** Creates an instance of ImageClassification class. */ - public ImageClassification() { - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withPrimaryMetric(ClassificationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageClassification object itself. - */ - public ImageClassification withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassification withTrainingData(MLTableJobInput 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 (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassification")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassification.class); -} 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 b0042428c4cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationBase.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ImageClassificationBase class. */ - public ImageClassificationBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassificationBase object itself. - */ - public ImageClassificationBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } -} 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 a53c34a35f6f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageClassificationMultilabel.java +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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] 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** Creates an instance of ImageClassificationMultilabel class. */ - public ImageClassificationMultilabel() { - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ClassificationMultilabelPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withPrimaryMetric(ClassificationMultilabelPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsClassification modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withModelSettings(ImageModelSettingsClassification modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withSearchSpace( - List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageClassificationMultilabel object itself. - */ - public ImageClassificationMultilabel withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageClassificationMultilabel withTrainingData(MLTableJobInput 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 (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageClassificationMultilabel")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageClassificationMultilabel.class); -} 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 83c6fb3614ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageInstanceSegmentation.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.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] 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** Creates an instance of ImageInstanceSegmentation class. */ - public ImageInstanceSegmentation() { - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public InstanceSegmentationPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withPrimaryMetric(InstanceSegmentationPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageInstanceSegmentation object itself. - */ - public ImageInstanceSegmentation withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageInstanceSegmentation withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageInstanceSegmentation withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageInstanceSegmentation withTrainingData(MLTableJobInput 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 (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageInstanceSegmentation")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageInstanceSegmentation.class); -} 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 3bacfabcce46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageLimitSettings.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ImageLimitSettings class. */ - public ImageLimitSettings() { - } - - /** - * 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 968ea07751a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettings.java +++ /dev/null @@ -1,804 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /* - * 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; - - /** Creates an instance of ImageModelDistributionSettings class. */ - public ImageModelDistributionSettings() { - } - - /** - * Get the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @return the amsGradient value. - */ - public String amsGradient() { - return this.amsGradient; - } - - /** - * Set the amsGradient property: Enable AMSGrad when optimizer is 'adam' or 'adamw'. - * - * @param amsGradient the amsGradient value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withAmsGradient(String amsGradient) { - this.amsGradient = amsGradient; - return this; - } - - /** - * Get the augmentations property: Settings for using Augmentations. - * - * @return the augmentations value. - */ - public String augmentations() { - return this.augmentations; - } - - /** - * Set the augmentations property: Settings for using Augmentations. - * - * @param augmentations the augmentations value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withAugmentations(String augmentations) { - this.augmentations = augmentations; - return this; - } - - /** - * Get the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta1 value. - */ - public String beta1() { - return this.beta1; - } - - /** - * Set the beta1 property: Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta1 the beta1 value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withBeta1(String beta1) { - this.beta1 = beta1; - return this; - } - - /** - * Get the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @return the beta2 value. - */ - public String beta2() { - return this.beta2; - } - - /** - * Set the beta2 property: Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, - * 1]. - * - * @param beta2 the beta2 value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withBeta2(String beta2) { - this.beta2 = beta2; - return this; - } - - /** - * Get the distributed property: Whether to use distributer training. - * - * @return the distributed value. - */ - public String distributed() { - return this.distributed; - } - - /** - * Set the distributed property: Whether to use distributer training. - * - * @param distributed the distributed value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withDistributed(String distributed) { - this.distributed = distributed; - return this; - } - - /** - * Get the earlyStopping property: Enable early stopping logic during training. - * - * @return the earlyStopping value. - */ - public String earlyStopping() { - return this.earlyStopping; - } - - /** - * Set the earlyStopping property: Enable early stopping logic during training. - * - * @param earlyStopping the earlyStopping value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStopping(String earlyStopping) { - this.earlyStopping = earlyStopping; - return this; - } - - /** - * Get the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * - * @return the earlyStoppingDelay value. - */ - public String earlyStoppingDelay() { - return this.earlyStoppingDelay; - } - - /** - * Set the earlyStoppingDelay property: Minimum number of epochs or validation evaluations to wait before primary - * metric improvement is tracked for early stopping. Must be a positive integer. - * - * @param earlyStoppingDelay the earlyStoppingDelay value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStoppingDelay(String earlyStoppingDelay) { - this.earlyStoppingDelay = earlyStoppingDelay; - return this; - } - - /** - * Get the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * - * @return the earlyStoppingPatience value. - */ - public String earlyStoppingPatience() { - return this.earlyStoppingPatience; - } - - /** - * Set the earlyStoppingPatience property: Minimum number of epochs or validation evaluations with no primary metric - * improvement before the run is stopped. Must be a positive integer. - * - * @param earlyStoppingPatience the earlyStoppingPatience value to set. - * @return the ImageModelDistributionSettings object itself. - */ - public ImageModelDistributionSettings withEarlyStoppingPatience(String earlyStoppingPatience) { - this.earlyStoppingPatience = earlyStoppingPatience; - return this; - } - - /** - * Get the 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 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 5615072d4437..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsClassification.java +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /** Creates an instance of ImageModelDistributionSettingsClassification class. */ - public ImageModelDistributionSettingsClassification() { - } - - /** - * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @return the trainingCropSize value. - */ - public String trainingCropSize() { - return this.trainingCropSize; - } - - /** - * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @param trainingCropSize the trainingCropSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withTrainingCropSize(String trainingCropSize) { - this.trainingCropSize = trainingCropSize; - return this; - } - - /** - * Get the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @return the validationCropSize value. - */ - public String validationCropSize() { - return this.validationCropSize; - } - - /** - * Set the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @param validationCropSize the validationCropSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withValidationCropSize(String validationCropSize) { - this.validationCropSize = validationCropSize; - return this; - } - - /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @return the validationResizeSize value. - */ - public String validationResizeSize() { - return this.validationResizeSize; - } - - /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @param validationResizeSize the validationResizeSize value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withValidationResizeSize(String validationResizeSize) { - this.validationResizeSize = validationResizeSize; - return this; - } - - /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @return the weightedLoss value. - */ - public String weightedLoss() { - return this.weightedLoss; - } - - /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @param weightedLoss the weightedLoss value to set. - * @return the ImageModelDistributionSettingsClassification object itself. - */ - public ImageModelDistributionSettingsClassification withWeightedLoss(String weightedLoss) { - this.weightedLoss = weightedLoss; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withAmsGradient(String amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withBeta1(String beta1) { - super.withBeta1(beta1); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withBeta2(String beta2) { - super.withBeta2(beta2); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withDistributed(String distributed) { - super.withDistributed(distributed); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStopping(String earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStoppingDelay(String earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification withEarlyStoppingPatience(String earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsClassification 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 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 20c36d838c76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelDistributionSettingsObjectDetection.java +++ /dev/null @@ -1,623 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /** Creates an instance of ImageModelDistributionSettingsObjectDetection class. */ - public ImageModelDistributionSettingsObjectDetection() { - } - - /** - * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the boxDetectionsPerImage value. - */ - public String boxDetectionsPerImage() { - return this.boxDetectionsPerImage; - } - - /** - * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withBoxDetectionsPerImage(String boxDetectionsPerImage) { - this.boxDetectionsPerImage = boxDetectionsPerImage; - return this; - } - - /** - * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @return the boxScoreThreshold value. - */ - public String boxScoreThreshold() { - return this.boxScoreThreshold; - } - - /** - * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @param boxScoreThreshold the boxScoreThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withBoxScoreThreshold(String boxScoreThreshold) { - this.boxScoreThreshold = boxScoreThreshold; - return this; - } - - /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * - * @return the imageSize value. - */ - public String imageSize() { - return this.imageSize; - } - - /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * - * @param imageSize the imageSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withImageSize(String imageSize) { - this.imageSize = imageSize; - return this; - } - - /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the maxSize value. - */ - public String maxSize() { - return this.maxSize; - } - - /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param maxSize the maxSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMaxSize(String maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the minSize value. - */ - public String minSize() { - return this.minSize; - } - - /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param minSize the minSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMinSize(String minSize) { - this.minSize = minSize; - return this; - } - - /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the modelSize value. - */ - public String modelSize() { - return this.modelSize; - } - - /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param modelSize the modelSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withModelSize(String modelSize) { - this.modelSize = modelSize; - return this; - } - - /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the multiScale value. - */ - public String multiScale() { - return this.multiScale; - } - - /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param multiScale the multiScale value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withMultiScale(String multiScale) { - this.multiScale = multiScale; - return this; - } - - /** - * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in - * the range [0, 1]. - * - * @return the nmsIouThreshold value. - */ - public String nmsIouThreshold() { - return this.nmsIouThreshold; - } - - /** - * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be float in - * the range [0, 1]. - * - * @param nmsIouThreshold the nmsIouThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withNmsIouThreshold(String nmsIouThreshold) { - this.nmsIouThreshold = nmsIouThreshold; - return this; - } - - /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the tileGridSize value. - */ - public String tileGridSize() { - return this.tileGridSize; - } - - /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param tileGridSize the tileGridSize value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withTileGridSize(String tileGridSize) { - this.tileGridSize = tileGridSize; - return this; - } - - /** - * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileOverlapRatio value. - */ - public String tileOverlapRatio() { - return this.tileOverlapRatio; - } - - /** - * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileOverlapRatio the tileOverlapRatio value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withTileOverlapRatio(String tileOverlapRatio) { - this.tileOverlapRatio = tileOverlapRatio; - return this; - } - - /** - * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression. - * - * @return the tilePredictionsNmsThreshold value. - */ - public String tilePredictionsNmsThreshold() { - return this.tilePredictionsNmsThreshold; - } - - /** - * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. NMS: Non-maximum suppression. - * - * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withTilePredictionsNmsThreshold( - String tilePredictionsNmsThreshold) { - this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; - return this; - } - - /** - * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @return the validationIouThreshold value. - */ - public String validationIouThreshold() { - return this.validationIouThreshold; - } - - /** - * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @param validationIouThreshold the validationIouThreshold value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withValidationIouThreshold(String validationIouThreshold) { - this.validationIouThreshold = validationIouThreshold; - return this; - } - - /** - * Get the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', - * 'coco', 'voc', or 'coco_voc'. - * - * @return the validationMetricType value. - */ - public String validationMetricType() { - return this.validationMetricType; - } - - /** - * Set the validationMetricType property: Metric computation method to use for validation metrics. Must be 'none', - * 'coco', 'voc', or 'coco_voc'. - * - * @param validationMetricType the validationMetricType value to set. - * @return the ImageModelDistributionSettingsObjectDetection object itself. - */ - public ImageModelDistributionSettingsObjectDetection withValidationMetricType(String validationMetricType) { - this.validationMetricType = validationMetricType; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withAmsGradient(String amsGradient) { - super.withAmsGradient(amsGradient); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withAugmentations(String augmentations) { - super.withAugmentations(augmentations); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withBeta1(String beta1) { - super.withBeta1(beta1); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withBeta2(String beta2) { - super.withBeta2(beta2); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withDistributed(String distributed) { - super.withDistributed(distributed); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStopping(String earlyStopping) { - super.withEarlyStopping(earlyStopping); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStoppingDelay(String earlyStoppingDelay) { - super.withEarlyStoppingDelay(earlyStoppingDelay); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection withEarlyStoppingPatience(String earlyStoppingPatience) { - super.withEarlyStoppingPatience(earlyStoppingPatience); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelDistributionSettingsObjectDetection 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 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 bd105b216e35..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettings.java +++ /dev/null @@ -1,907 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /* - * Frequency to store model checkpoints. Must be a positive integer. - */ - @JsonProperty(value = "checkpointFrequency") - private Integer checkpointFrequency; - - /* - * The pretrained checkpoint model for incremental training. - */ - @JsonProperty(value = "checkpointModel") - private MLFlowModelJobInput checkpointModel; - - /* - * 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; - - /* - * 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; - - /** Creates an instance of ImageModelSettings class. */ - public ImageModelSettings() { - } - - /** - * 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 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 checkpointModel property: The pretrained checkpoint model for incremental training. - * - * @return the checkpointModel value. - */ - public MLFlowModelJobInput checkpointModel() { - return this.checkpointModel; - } - - /** - * Set the checkpointModel property: The pretrained checkpoint model for incremental training. - * - * @param checkpointModel the checkpointModel value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withCheckpointModel(MLFlowModelJobInput checkpointModel) { - this.checkpointModel = checkpointModel; - return this; - } - - /** - * Get the 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 stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @return the stepLRGamma value. - */ - public Float stepLRGamma() { - return this.stepLRGamma; - } - - /** - * Set the stepLRGamma property: Value of gamma when learning rate scheduler is 'step'. Must be a float in the range - * [0, 1]. - * - * @param stepLRGamma the stepLRGamma value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withStepLRGamma(Float stepLRGamma) { - this.stepLRGamma = stepLRGamma; - return this; - } - - /** - * Get the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @return the stepLRStepSize value. - */ - public Integer stepLRStepSize() { - return this.stepLRStepSize; - } - - /** - * Set the stepLRStepSize property: Value of step size when learning rate scheduler is 'step'. Must be a positive - * integer. - * - * @param stepLRStepSize the stepLRStepSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withStepLRStepSize(Integer stepLRStepSize) { - this.stepLRStepSize = stepLRStepSize; - return this; - } - - /** - * Get the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @return the trainingBatchSize value. - */ - public Integer trainingBatchSize() { - return this.trainingBatchSize; - } - - /** - * Set the trainingBatchSize property: Training batch size. Must be a positive integer. - * - * @param trainingBatchSize the trainingBatchSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withTrainingBatchSize(Integer trainingBatchSize) { - this.trainingBatchSize = trainingBatchSize; - return this; - } - - /** - * Get the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @return the validationBatchSize value. - */ - public Integer validationBatchSize() { - return this.validationBatchSize; - } - - /** - * Set the validationBatchSize property: Validation batch size. Must be a positive integer. - * - * @param validationBatchSize the validationBatchSize value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withValidationBatchSize(Integer validationBatchSize) { - this.validationBatchSize = validationBatchSize; - return this; - } - - /** - * Get the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @return the warmupCosineLRCycles value. - */ - public Float warmupCosineLRCycles() { - return this.warmupCosineLRCycles; - } - - /** - * Set the warmupCosineLRCycles property: Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. - * Must be a float in the range [0, 1]. - * - * @param warmupCosineLRCycles the warmupCosineLRCycles value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWarmupCosineLRCycles(Float warmupCosineLRCycles) { - this.warmupCosineLRCycles = warmupCosineLRCycles; - return this; - } - - /** - * Get the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @return the warmupCosineLRWarmupEpochs value. - */ - public Integer warmupCosineLRWarmupEpochs() { - return this.warmupCosineLRWarmupEpochs; - } - - /** - * Set the warmupCosineLRWarmupEpochs property: Value of warmup epochs when learning rate scheduler is - * 'warmup_cosine'. Must be a positive integer. - * - * @param warmupCosineLRWarmupEpochs the warmupCosineLRWarmupEpochs value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWarmupCosineLRWarmupEpochs(Integer warmupCosineLRWarmupEpochs) { - this.warmupCosineLRWarmupEpochs = warmupCosineLRWarmupEpochs; - return this; - } - - /** - * Get the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @return the weightDecay value. - */ - public Float weightDecay() { - return this.weightDecay; - } - - /** - * Set the weightDecay property: Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float - * in the range[0, 1]. - * - * @param weightDecay the weightDecay value to set. - * @return the ImageModelSettings object itself. - */ - public ImageModelSettings withWeightDecay(Float weightDecay) { - this.weightDecay = weightDecay; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (checkpointModel() != null) { - checkpointModel().validate(); - } - } -} 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 27e3463da73d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsClassification.java +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ImageModelSettingsClassification class. */ - public ImageModelSettingsClassification() { - } - - /** - * Get the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @return the trainingCropSize value. - */ - public Integer trainingCropSize() { - return this.trainingCropSize; - } - - /** - * Set the trainingCropSize property: Image crop size that is input to the neural network for the training dataset. - * Must be a positive integer. - * - * @param trainingCropSize the trainingCropSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withTrainingCropSize(Integer trainingCropSize) { - this.trainingCropSize = trainingCropSize; - return this; - } - - /** - * Get the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @return the validationCropSize value. - */ - public Integer validationCropSize() { - return this.validationCropSize; - } - - /** - * Set the validationCropSize property: Image crop size that is input to the neural network for the validation - * dataset. Must be a positive integer. - * - * @param validationCropSize the validationCropSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withValidationCropSize(Integer validationCropSize) { - this.validationCropSize = validationCropSize; - return this; - } - - /** - * Get the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @return the validationResizeSize value. - */ - public Integer validationResizeSize() { - return this.validationResizeSize; - } - - /** - * Set the validationResizeSize property: Image size to which to resize before cropping for validation dataset. Must - * be a positive integer. - * - * @param validationResizeSize the validationResizeSize value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withValidationResizeSize(Integer validationResizeSize) { - this.validationResizeSize = validationResizeSize; - return this; - } - - /** - * Get the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @return the weightedLoss value. - */ - public Integer weightedLoss() { - return this.weightedLoss; - } - - /** - * Set the weightedLoss property: Weighted loss. The accepted values are 0 for no weighted loss. 1 for weighted loss - * with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. - * - * @param weightedLoss the weightedLoss value to set. - * @return the ImageModelSettingsClassification object itself. - */ - public ImageModelSettingsClassification withWeightedLoss(Integer weightedLoss) { - this.weightedLoss = weightedLoss; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification 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 withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsClassification withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); - 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 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 aa171c49914d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageModelSettingsObjectDetection.java +++ /dev/null @@ -1,642 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /** Creates an instance of ImageModelSettingsObjectDetection class. */ - public ImageModelSettingsObjectDetection() { - } - - /** - * Get the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the boxDetectionsPerImage value. - */ - public Integer boxDetectionsPerImage() { - return this.boxDetectionsPerImage; - } - - /** - * Set the boxDetectionsPerImage property: Maximum number of detections per image, for all classes. Must be a - * positive integer. Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param boxDetectionsPerImage the boxDetectionsPerImage value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withBoxDetectionsPerImage(Integer boxDetectionsPerImage) { - this.boxDetectionsPerImage = boxDetectionsPerImage; - return this; - } - - /** - * Get the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @return the boxScoreThreshold value. - */ - public Float boxScoreThreshold() { - return this.boxScoreThreshold; - } - - /** - * Set the boxScoreThreshold property: During inference, only return proposals with a classification score greater - * than BoxScoreThreshold. Must be a float in the range[0, 1]. - * - * @param boxScoreThreshold the boxScoreThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withBoxScoreThreshold(Float boxScoreThreshold) { - this.boxScoreThreshold = boxScoreThreshold; - return this; - } - - /** - * Get the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * - * @return the imageSize value. - */ - public Integer imageSize() { - return this.imageSize; - } - - /** - * Set the imageSize property: Image size for train and validation. Must be a positive integer. Note: The training - * run may get into CUDA OOM if the size is too big. Note: This settings is only supported for the 'yolov5' - * algorithm. - * - * @param imageSize the imageSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withImageSize(Integer imageSize) { - this.imageSize = imageSize; - return this; - } - - /** - * Get the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the maxSize value. - */ - public Integer maxSize() { - return this.maxSize; - } - - /** - * Set the maxSize property: Maximum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param maxSize the maxSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMaxSize(Integer maxSize) { - this.maxSize = maxSize; - return this; - } - - /** - * Get the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the minSize value. - */ - public Integer minSize() { - return this.minSize; - } - - /** - * Set the minSize property: Minimum size of the image to be rescaled before feeding it to the backbone. Must be a - * positive integer. Note: training run may get into CUDA OOM if the size is too big. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param minSize the minSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMinSize(Integer minSize) { - this.minSize = minSize; - return this; - } - - /** - * Get the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the modelSize value. - */ - public ModelSize modelSize() { - return this.modelSize; - } - - /** - * Set the modelSize property: Model size. Must be 'small', 'medium', 'large', or 'xlarge'. Note: training run may - * get into CUDA OOM if the model size is too big. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param modelSize the modelSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withModelSize(ModelSize modelSize) { - this.modelSize = modelSize; - return this; - } - - /** - * Get the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @return the multiScale value. - */ - public Boolean multiScale() { - return this.multiScale; - } - - /** - * Set the multiScale property: Enable multi-scale image by varying image size by +/- 50%. Note: training run may - * get into CUDA OOM if no sufficient GPU memory. Note: This settings is only supported for the 'yolov5' algorithm. - * - * @param multiScale the multiScale value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withMultiScale(Boolean multiScale) { - this.multiScale = multiScale; - return this; - } - - /** - * Get the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in - * the range [0, 1]. - * - * @return the nmsIouThreshold value. - */ - public Float nmsIouThreshold() { - return this.nmsIouThreshold; - } - - /** - * Set the nmsIouThreshold property: IOU threshold used during inference in NMS post processing. Must be a float in - * the range [0, 1]. - * - * @param nmsIouThreshold the nmsIouThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withNmsIouThreshold(Float nmsIouThreshold) { - this.nmsIouThreshold = nmsIouThreshold; - return this; - } - - /** - * Get the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @return the tileGridSize value. - */ - public String tileGridSize() { - return this.tileGridSize; - } - - /** - * Set the tileGridSize property: The grid size to use for tiling each image. Note: TileGridSize must not be None to - * enable small object detection logic. A string containing two integers in mxn format. Note: This settings is not - * supported for the 'yolov5' algorithm. - * - * @param tileGridSize the tileGridSize value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTileGridSize(String tileGridSize) { - this.tileGridSize = tileGridSize; - return this; - } - - /** - * Get the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * - * @return the tileOverlapRatio value. - */ - public Float tileOverlapRatio() { - return this.tileOverlapRatio; - } - - /** - * Set the tileOverlapRatio property: Overlap ratio between adjacent tiles in each dimension. Must be float in the - * range [0, 1). Note: This settings is not supported for the 'yolov5' algorithm. - * - * @param tileOverlapRatio the tileOverlapRatio value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTileOverlapRatio(Float tileOverlapRatio) { - this.tileOverlapRatio = tileOverlapRatio; - return this; - } - - /** - * Get the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. - * - * @return the tilePredictionsNmsThreshold value. - */ - public Float tilePredictionsNmsThreshold() { - return this.tilePredictionsNmsThreshold; - } - - /** - * Set the tilePredictionsNmsThreshold property: The IOU threshold to use to perform NMS while merging predictions - * from tiles and image. Used in validation/ inference. Must be float in the range [0, 1]. Note: This settings is - * not supported for the 'yolov5' algorithm. - * - * @param tilePredictionsNmsThreshold the tilePredictionsNmsThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withTilePredictionsNmsThreshold(Float tilePredictionsNmsThreshold) { - this.tilePredictionsNmsThreshold = tilePredictionsNmsThreshold; - return this; - } - - /** - * Get the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @return the validationIouThreshold value. - */ - public Float validationIouThreshold() { - return this.validationIouThreshold; - } - - /** - * Set the validationIouThreshold property: IOU threshold to use when computing validation metric. Must be float in - * the range [0, 1]. - * - * @param validationIouThreshold the validationIouThreshold value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withValidationIouThreshold(Float validationIouThreshold) { - this.validationIouThreshold = validationIouThreshold; - return this; - } - - /** - * Get the validationMetricType property: Metric computation method to use for validation metrics. - * - * @return the validationMetricType value. - */ - public ValidationMetricType validationMetricType() { - return this.validationMetricType; - } - - /** - * Set the validationMetricType property: Metric computation method to use for validation metrics. - * - * @param validationMetricType the validationMetricType value to set. - * @return the ImageModelSettingsObjectDetection object itself. - */ - public ImageModelSettingsObjectDetection withValidationMetricType(ValidationMetricType validationMetricType) { - this.validationMetricType = validationMetricType; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection 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 withCheckpointFrequency(Integer checkpointFrequency) { - super.withCheckpointFrequency(checkpointFrequency); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageModelSettingsObjectDetection withCheckpointModel(MLFlowModelJobInput checkpointModel) { - super.withCheckpointModel(checkpointModel); - 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 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 3e331ef4ba45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetection.java +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.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] 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** Creates an instance of ImageObjectDetection class. */ - public ImageObjectDetection() { - } - - /** - * Get the primaryMetric property: Primary metric to optimize for this task. - * - * @return the primaryMetric value. - */ - public ObjectDetectionPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric to optimize for this task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withPrimaryMetric(ObjectDetectionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageObjectDetection object itself. - */ - public ImageObjectDetection withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetection withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetection withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetection withTrainingData(MLTableJobInput 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 (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property limitSettings in model ImageObjectDetection")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageObjectDetection.class); -} 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 e3a955e714ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageObjectDetectionBase.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ImageObjectDetectionBase class. */ - public ImageObjectDetectionBase() { - } - - /** - * Get the modelSettings property: Settings used for training the model. - * - * @return the modelSettings value. - */ - public ImageModelSettingsObjectDetection modelSettings() { - return this.modelSettings; - } - - /** - * Set the modelSettings property: Settings used for training the model. - * - * @param modelSettings the modelSettings value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withModelSettings(ImageModelSettingsObjectDetection modelSettings) { - this.modelSettings = modelSettings; - return this; - } - - /** - * Get the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @return the searchSpace value. - */ - public List searchSpace() { - return this.searchSpace; - } - - /** - * Set the searchSpace property: Search space for sampling different combinations of models and their - * hyperparameters. - * - * @param searchSpace the searchSpace value to set. - * @return the ImageObjectDetectionBase object itself. - */ - public ImageObjectDetectionBase withSearchSpace(List searchSpace) { - this.searchSpace = searchSpace; - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetectionBase withLimitSettings(ImageLimitSettings limitSettings) { - super.withLimitSettings(limitSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetectionBase withSweepSettings(ImageSweepSettings sweepSettings) { - super.withSweepSettings(sweepSettings); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetectionBase withValidationData(MLTableJobInput validationData) { - super.withValidationData(validationData); - return this; - } - - /** {@inheritDoc} */ - @Override - public ImageObjectDetectionBase withValidationDataSize(Double validationDataSize) { - super.withValidationDataSize(validationDataSize); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (modelSettings() != null) { - modelSettings().validate(); - } - if (searchSpace() != null) { - searchSpace().forEach(e -> e.validate()); - } - } -} 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 4fd01023cbb2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageSweepSettings.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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] Type of the hyperparameter sampling algorithms. - */ - @JsonProperty(value = "samplingAlgorithm", required = true) - private SamplingAlgorithmType samplingAlgorithm; - - /** Creates an instance of ImageSweepSettings class. */ - public ImageSweepSettings() { - } - - /** - * 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 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 (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 01fc3de24e7d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ImageVertical.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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] 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /** Creates an instance of ImageVertical class. */ - public ImageVertical() { - } - - /** - * Get the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @return the limitSettings value. - */ - public ImageLimitSettings limitSettings() { - return this.limitSettings; - } - - /** - * Set the limitSettings property: [Required] Limit settings for the AutoML job. - * - * @param limitSettings the limitSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withLimitSettings(ImageLimitSettings limitSettings) { - this.limitSettings = limitSettings; - return this; - } - - /** - * Get the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @return the sweepSettings value. - */ - public ImageSweepSettings sweepSettings() { - return this.sweepSettings; - } - - /** - * Set the sweepSettings property: Model sweeping and hyperparameter sweeping related settings. - * - * @param sweepSettings the sweepSettings value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withSweepSettings(ImageSweepSettings sweepSettings) { - this.sweepSettings = sweepSettings; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the ImageVertical object itself. - */ - public ImageVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (limitSettings() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property limitSettings in model ImageVertical")); - } else { - limitSettings().validate(); - } - if (sweepSettings() != null) { - sweepSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ImageVertical.class); -} 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 78878676f326..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InferenceContainerProperties.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.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; - - /** Creates an instance of InferenceContainerProperties class. */ - public InferenceContainerProperties() { - } - - /** - * Get the livenessRoute property: The route to check the liveness of the inference server container. - * - * @return the livenessRoute value. - */ - public Route livenessRoute() { - return this.livenessRoute; - } - - /** - * Set the livenessRoute property: The route to check the liveness of the inference server container. - * - * @param livenessRoute the livenessRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withLivenessRoute(Route livenessRoute) { - this.livenessRoute = livenessRoute; - return this; - } - - /** - * Get the readinessRoute property: The route to check the readiness of the inference server container. - * - * @return the readinessRoute value. - */ - public Route readinessRoute() { - return this.readinessRoute; - } - - /** - * Set the readinessRoute property: The route to check the readiness of the inference server container. - * - * @param readinessRoute the readinessRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withReadinessRoute(Route readinessRoute) { - this.readinessRoute = readinessRoute; - return this; - } - - /** - * Get the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * - * @return the scoringRoute value. - */ - public Route scoringRoute() { - return this.scoringRoute; - } - - /** - * Set the scoringRoute property: The port to send the scoring requests to, within the inference server container. - * - * @param scoringRoute the scoringRoute value to set. - * @return the InferenceContainerProperties object itself. - */ - public InferenceContainerProperties withScoringRoute(Route scoringRoute) { - this.scoringRoute = scoringRoute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (livenessRoute() != null) { - livenessRoute().validate(); - } - if (readinessRoute() != null) { - readinessRoute().validate(); - } - if (scoringRoute() != null) { - scoringRoute().validate(); - } - } -} 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 93f3ee308a11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InputDeliveryMode.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enum to determine the input data delivery mode. */ -public final class InputDeliveryMode extends ExpandableStringEnum { - /** Static value ReadOnlyMount for InputDeliveryMode. */ - public static final InputDeliveryMode READ_ONLY_MOUNT = fromString("ReadOnlyMount"); - - /** Static value ReadWriteMount for InputDeliveryMode. */ - public static final InputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - - /** Static value Download for InputDeliveryMode. */ - public static final InputDeliveryMode DOWNLOAD = fromString("Download"); - - /** Static value Direct for InputDeliveryMode. */ - public static final InputDeliveryMode DIRECT = fromString("Direct"); - - /** Static value EvalMount for InputDeliveryMode. */ - public static final InputDeliveryMode EVAL_MOUNT = fromString("EvalMount"); - - /** Static value EvalDownload for InputDeliveryMode. */ - public static final InputDeliveryMode EVAL_DOWNLOAD = fromString("EvalDownload"); - - /** - * Creates a new instance of InputDeliveryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InputDeliveryMode() { - } - - /** - * Creates or finds a InputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding InputDeliveryMode. - */ - @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 b95f8b7936cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceSegmentationPrimaryMetrics.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; - -/** Primary metrics for InstanceSegmentation tasks. */ -public final class InstanceSegmentationPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for InstanceSegmentationPrimaryMetrics. */ - public static final InstanceSegmentationPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates a new instance of InstanceSegmentationPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public InstanceSegmentationPrimaryMetrics() { - } - - /** - * Creates or finds a InstanceSegmentationPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding InstanceSegmentationPrimaryMetrics. - */ - @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 af0266978dd8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchema.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.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; - - /** Creates an instance of InstanceTypeSchema class. */ - public InstanceTypeSchema() { - } - - /** - * Get the nodeSelector property: Node Selector. - * - * @return the nodeSelector value. - */ - public Map nodeSelector() { - return this.nodeSelector; - } - - /** - * Set the nodeSelector property: Node Selector. - * - * @param nodeSelector the nodeSelector value to set. - * @return the InstanceTypeSchema object itself. - */ - public InstanceTypeSchema withNodeSelector(Map nodeSelector) { - this.nodeSelector = nodeSelector; - return this; - } - - /** - * Get the resources property: Resource requests/limits for this instance type. - * - * @return the resources value. - */ - public InstanceTypeSchemaResources resources() { - return this.resources; - } - - /** - * Set the resources property: Resource requests/limits for this instance type. - * - * @param resources the resources value to set. - * @return the InstanceTypeSchema object itself. - */ - public InstanceTypeSchema withResources(InstanceTypeSchemaResources resources) { - this.resources = resources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (resources() != null) { - resources().validate(); - } - } -} 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 661d7afb7006..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/InstanceTypeSchemaResources.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.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; - - /** Creates an instance of InstanceTypeSchemaResources class. */ - public InstanceTypeSchemaResources() { - } - - /** - * Get the requests property: Resource requests for this instance type. - * - * @return the requests value. - */ - public Map requests() { - return this.requests; - } - - /** - * Set the requests property: Resource requests for this instance type. - * - * @param requests the requests value to set. - * @return the InstanceTypeSchemaResources object itself. - */ - public InstanceTypeSchemaResources withRequests(Map requests) { - this.requests = requests; - return this; - } - - /** - * Get the limits property: Resource limits for this instance type. - * - * @return the limits value. - */ - public Map limits() { - return this.limits; - } - - /** - * Set the limits property: Resource limits for this instance type. - * - * @param limits the limits value to set. - * @return the InstanceTypeSchemaResources object itself. - */ - public InstanceTypeSchemaResources withLimits(Map limits) { - this.limits = limits; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.java deleted file mode 100644 index 3e18abd293bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBase.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; - -/** An immutable client-side representation of JobBase. */ -public interface JobBase { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - JobBaseProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner object. - * - * @return the inner object. - */ - JobBaseInner innerModel(); - - /** The entirety of the JobBase definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The JobBase definition stages. */ - interface DefinitionStages { - /** The first stage of the JobBase definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the JobBase definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the JobBase definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(JobBaseProperties properties); - } - /** - * The stage of the JobBase definition which contains all the minimum required properties for the resource to be - * created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - JobBase create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JobBase create(Context context); - } - } - /** - * Begins update for the JobBase resource. - * - * @return the stage of resource update. - */ - JobBase.Update update(); - - /** The template for JobBase update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JobBase apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JobBase apply(Context context); - } - /** The JobBase update stages. */ - interface UpdateStages { - /** The stage of the JobBase update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(JobBaseProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JobBase refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JobBase refresh(Context context); - - /** - * Cancels a Job (asynchronous). - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(); - - /** - * Cancels a Job (asynchronous). - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java deleted file mode 100644 index 8a72ed8f844b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseProperties.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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 = JobBaseProperties.class) -@JsonTypeName("JobBaseProperties") -@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 JobBaseProperties extends ResourceBase { - /* - * ARM resource ID of the component resource. - */ - @JsonProperty(value = "componentId") - private String componentId; - - /* - * 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; - - /* - * 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; - - /** Creates an instance of JobBaseProperties class. */ - public JobBaseProperties() { - } - - /** - * Get the componentId property: ARM resource ID of the component resource. - * - * @return the componentId value. - */ - public String componentId() { - return this.componentId; - } - - /** - * Set the componentId property: ARM resource ID of the component resource. - * - * @param componentId the componentId value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withComponentId(String componentId) { - this.componentId = componentId; - return this; - } - - /** - * Get the computeId property: ARM resource ID of the compute resource. - * - * @return the computeId value. - */ - public String computeId() { - return this.computeId; - } - - /** - * Set the computeId property: ARM resource ID of the compute resource. - * - * @param computeId the computeId value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withComputeId(String computeId) { - this.computeId = computeId; - return this; - } - - /** - * Get the displayName property: Display name of job. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of job. - * - * @param displayName the displayName value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. - * - * @return the experimentName value. - */ - public String experimentName() { - return this.experimentName; - } - - /** - * Set the experimentName property: The name of the experiment the job belongs to. If not set, the job is placed in - * the "Default" experiment. - * - * @param experimentName the experimentName value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withExperimentName(String experimentName) { - this.experimentName = experimentName; - return this; - } - - /** - * Get the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. Defaults to AmlToken if null. - * - * @return the identity value. - */ - public IdentityConfiguration identity() { - return this.identity; - } - - /** - * Set the identity property: Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, - * UserIdentity or null. Defaults to AmlToken if null. - * - * @param identity the identity value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withIdentity(IdentityConfiguration identity) { - this.identity = identity; - return this; - } - - /** - * Get the isArchived property: Is the asset archived?. - * - * @return the isArchived value. - */ - public Boolean isArchived() { - return this.isArchived; - } - - /** - * Set the isArchived property: Is the asset archived?. - * - * @param isArchived the isArchived value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withIsArchived(Boolean isArchived) { - this.isArchived = isArchived; - return this; - } - - /** - * Get the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. - * - * @return the services value. - */ - public Map services() { - return this.services; - } - - /** - * Set the services property: List of JobEndpoints. For local jobs, a job endpoint will have an endpoint value of - * FileStreamObject. - * - * @param services the services value to set. - * @return the JobBaseProperties object itself. - */ - public JobBaseProperties withServices(Map services) { - this.services = services; - return this; - } - - /** - * Get the status property: Status of the job. - * - * @return the status value. - */ - public JobStatus status() { - return this.status; - } - - /** {@inheritDoc} */ - @Override - public JobBaseProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobBaseProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobBaseProperties 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 (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 c9675b3e0c18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobBaseResourceArmPaginatedResult.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -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; - - /** Creates an instance of JobBaseResourceArmPaginatedResult class. */ - public JobBaseResourceArmPaginatedResult() { - } - - /** - * 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 5cba43503e85..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInput.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.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 = "custom_model", value = CustomModelJobInput.class), - @JsonSubTypes.Type(name = "mlflow_model", value = MLFlowModelJobInput.class), - @JsonSubTypes.Type(name = "literal", value = LiteralJobInput.class), - @JsonSubTypes.Type(name = "triton_model", value = TritonModelJobInput.class), - @JsonSubTypes.Type(name = "uri_file", value = UriFileJobInput.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobInput.class) -}) -@Fluent -public class JobInput { - /* - * Description for the input. - */ - @JsonProperty(value = "description") - private String description; - - /** Creates an instance of JobInput class. */ - public JobInput() { - } - - /** - * 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 92e6f586c793..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobInputType.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; - -/** Enum to determine the Job Input Type. */ -public final class JobInputType extends ExpandableStringEnum { - /** Static value literal for JobInputType. */ - public static final JobInputType LITERAL = fromString("literal"); - - /** Static value uri_file for JobInputType. */ - public static final JobInputType URI_FILE = fromString("uri_file"); - - /** Static value uri_folder for JobInputType. */ - public static final JobInputType URI_FOLDER = fromString("uri_folder"); - - /** Static value mltable for JobInputType. */ - public static final JobInputType MLTABLE = fromString("mltable"); - - /** Static value custom_model for JobInputType. */ - public static final JobInputType CUSTOM_MODEL = fromString("custom_model"); - - /** Static value mlflow_model for JobInputType. */ - public static final JobInputType MLFLOW_MODEL = fromString("mlflow_model"); - - /** Static value triton_model for JobInputType. */ - public static final JobInputType TRITON_MODEL = fromString("triton_model"); - - /** - * Creates a new instance of JobInputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobInputType() { - } - - /** - * Creates or finds a JobInputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobInputType. - */ - @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 c79da820462a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimits.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; -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; - - /** Creates an instance of JobLimits class. */ - public JobLimits() { - } - - /** - * 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 943280f65918..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobLimitsType.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 JobLimitsType. */ -public final class JobLimitsType extends ExpandableStringEnum { - /** Static value Command for JobLimitsType. */ - public static final JobLimitsType COMMAND = fromString("Command"); - - /** Static value Sweep for JobLimitsType. */ - public static final JobLimitsType SWEEP = fromString("Sweep"); - - /** - * Creates a new instance of JobLimitsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobLimitsType() { - } - - /** - * Creates or finds a JobLimitsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobLimitsType. - */ - @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 b8c523ed40f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutput.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; - -/** 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 = "custom_model", value = CustomModelJobOutput.class), - @JsonSubTypes.Type(name = "mlflow_model", value = MLFlowModelJobOutput.class), - @JsonSubTypes.Type(name = "mltable", value = MLTableJobOutput.class), - @JsonSubTypes.Type(name = "triton_model", value = TritonModelJobOutput.class), - @JsonSubTypes.Type(name = "uri_file", value = UriFileJobOutput.class), - @JsonSubTypes.Type(name = "uri_folder", value = UriFolderJobOutput.class) -}) -@Fluent -public class JobOutput { - /* - * Description for the output. - */ - @JsonProperty(value = "description") - private String description; - - /** Creates an instance of JobOutput class. */ - public JobOutput() { - } - - /** - * 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 c3d9ba0102f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobOutputType.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enum to determine the Job Output Type. */ -public final class JobOutputType extends ExpandableStringEnum { - /** Static value uri_file for JobOutputType. */ - public static final JobOutputType URI_FILE = fromString("uri_file"); - - /** Static value uri_folder for JobOutputType. */ - public static final JobOutputType URI_FOLDER = fromString("uri_folder"); - - /** Static value mltable for JobOutputType. */ - public static final JobOutputType MLTABLE = fromString("mltable"); - - /** Static value custom_model for JobOutputType. */ - public static final JobOutputType CUSTOM_MODEL = fromString("custom_model"); - - /** Static value mlflow_model for JobOutputType. */ - public static final JobOutputType MLFLOW_MODEL = fromString("mlflow_model"); - - /** Static value triton_model for JobOutputType. */ - public static final JobOutputType TRITON_MODEL = fromString("triton_model"); - - /** - * Creates a new instance of JobOutputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobOutputType() { - } - - /** - * Creates or finds a JobOutputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobOutputType. - */ - @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/JobResourceConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.java deleted file mode 100644 index 37e80aca4c90..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobResourceConfiguration.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.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The JobResourceConfiguration model. */ -@Fluent -public final class JobResourceConfiguration extends ResourceConfiguration { - /* - * Extra arguments to pass to the Docker run command. This would override any parameters that have already been set - * by the system, or in this section. This parameter is only supported for Azure ML compute types. - */ - @JsonProperty(value = "dockerArgs") - private String dockerArgs; - - /* - * Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number - * as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). - */ - @JsonProperty(value = "shmSize") - private String shmSize; - - /** Creates an instance of JobResourceConfiguration class. */ - public JobResourceConfiguration() { - } - - /** - * Get the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any - * parameters that have already been set by the system, or in this section. This parameter is only supported for - * Azure ML compute types. - * - * @return the dockerArgs value. - */ - public String dockerArgs() { - return this.dockerArgs; - } - - /** - * Set the dockerArgs property: Extra arguments to pass to the Docker run command. This would override any - * parameters that have already been set by the system, or in this section. This parameter is only supported for - * Azure ML compute types. - * - * @param dockerArgs the dockerArgs value to set. - * @return the JobResourceConfiguration object itself. - */ - public JobResourceConfiguration withDockerArgs(String dockerArgs) { - this.dockerArgs = dockerArgs; - return this; - } - - /** - * Get the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @return the shmSize value. - */ - public String shmSize() { - return this.shmSize; - } - - /** - * Set the shmSize property: Size of the docker container's shared memory block. This should be in the format of - * (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), - * m(megabytes), or g(gigabytes). - * - * @param shmSize the shmSize value to set. - * @return the JobResourceConfiguration object itself. - */ - public JobResourceConfiguration withShmSize(String shmSize) { - this.shmSize = shmSize; - return this; - } - - /** {@inheritDoc} */ - @Override - public JobResourceConfiguration withInstanceCount(Integer instanceCount) { - super.withInstanceCount(instanceCount); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobResourceConfiguration withInstanceType(String instanceType) { - super.withInstanceType(instanceType); - return this; - } - - /** {@inheritDoc} */ - @Override - public JobResourceConfiguration withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.java deleted file mode 100644 index c1c7ffbdf77a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobScheduleAction.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.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The JobScheduleAction model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionType") -@JsonTypeName("CreateJob") -@Fluent -public final class JobScheduleAction extends ScheduleActionBase { - /* - * [Required] Defines Schedule action definition details. - */ - @JsonProperty(value = "jobDefinition", required = true) - private JobBaseProperties jobDefinition; - - /** Creates an instance of JobScheduleAction class. */ - public JobScheduleAction() { - } - - /** - * Get the jobDefinition property: [Required] Defines Schedule action definition details. - * - * @return the jobDefinition value. - */ - public JobBaseProperties jobDefinition() { - return this.jobDefinition; - } - - /** - * Set the jobDefinition property: [Required] Defines Schedule action definition details. - * - * @param jobDefinition the jobDefinition value to set. - * @return the JobScheduleAction object itself. - */ - public JobScheduleAction withJobDefinition(JobBaseProperties jobDefinition) { - this.jobDefinition = jobDefinition; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (jobDefinition() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property jobDefinition in model JobScheduleAction")); - } else { - jobDefinition().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobScheduleAction.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 a581c73835ad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobService.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of JobService class. */ - public JobService() { - } - - /** - * 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 009ec1b6995b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobStatus.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The status of a job. */ -public final class JobStatus extends ExpandableStringEnum { - /** Static value NotStarted for JobStatus. */ - public static final JobStatus NOT_STARTED = fromString("NotStarted"); - - /** Static value Starting for JobStatus. */ - public static final JobStatus STARTING = fromString("Starting"); - - /** Static value Provisioning for JobStatus. */ - public static final JobStatus PROVISIONING = fromString("Provisioning"); - - /** Static value Preparing for JobStatus. */ - public static final JobStatus PREPARING = fromString("Preparing"); - - /** Static value Queued for JobStatus. */ - public static final JobStatus QUEUED = fromString("Queued"); - - /** Static value Running for JobStatus. */ - public static final JobStatus RUNNING = fromString("Running"); - - /** Static value Finalizing for JobStatus. */ - public static final JobStatus FINALIZING = fromString("Finalizing"); - - /** Static value CancelRequested for JobStatus. */ - public static final JobStatus CANCEL_REQUESTED = fromString("CancelRequested"); - - /** Static value Completed for JobStatus. */ - public static final JobStatus COMPLETED = fromString("Completed"); - - /** Static value Failed for JobStatus. */ - public static final JobStatus FAILED = fromString("Failed"); - - /** Static value Canceled for JobStatus. */ - public static final JobStatus CANCELED = fromString("Canceled"); - - /** Static value NotResponding for JobStatus. */ - public static final JobStatus NOT_RESPONDING = fromString("NotResponding"); - - /** Static value Paused for JobStatus. */ - public static final JobStatus PAUSED = fromString("Paused"); - - /** Static value Unknown for JobStatus. */ - public static final JobStatus UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of JobStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobStatus() { - } - - /** - * Creates or finds a JobStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobStatus. - */ - @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 681eb7abb044..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/JobType.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; - -/** Enum to determine the type of job. */ -public final class JobType extends ExpandableStringEnum { - /** Static value AutoML for JobType. */ - public static final JobType AUTO_ML = fromString("AutoML"); - - /** Static value Command for JobType. */ - public static final JobType COMMAND = fromString("Command"); - - /** Static value Sweep for JobType. */ - public static final JobType SWEEP = fromString("Sweep"); - - /** Static value Pipeline for JobType. */ - public static final JobType PIPELINE = fromString("Pipeline"); - - /** - * Creates a new instance of JobType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobType() { - } - - /** - * Creates or finds a JobType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobType. - */ - @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 cba708d43905..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Jobs.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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 context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the 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, - Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String id); - - /** - * Deletes a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id. - */ - JobBase get(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(String resourceGroupName, String workspaceName, String id); - - /** - * Cancels a Job (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param id The name and identifier for the Job. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void cancel(String resourceGroupName, String workspaceName, String id, Context context); - - /** - * Gets a Job by name/id. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. - */ - JobBase getById(String id); - - /** - * Gets a Job by name/id. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Job by name/id along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Job (asynchronous). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a Job (asynchronous). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new JobBase resource. - * - * @param name resource name. - * @return the first stage of the new JobBase definition. - */ - JobBase.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.java deleted file mode 100644 index 5485b2f4e8bc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KeyType.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 KeyType. */ -public final class KeyType extends ExpandableStringEnum { - /** Static value Primary for KeyType. */ - public static final KeyType PRIMARY = fromString("Primary"); - - /** Static value Secondary for KeyType. */ - public static final KeyType SECONDARY = fromString("Secondary"); - - /** - * Creates a new instance of KeyType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public KeyType() { - } - - /** - * Creates or finds a KeyType from its string representation. - * - * @param name a name to look for. - * @return the corresponding KeyType. - */ - @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 e5f2de0d139f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Kubernetes.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of Kubernetes class. */ - public Kubernetes() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public Kubernetes withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public Kubernetes withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public Kubernetes withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 9a07bac3c9c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesOnlineDeployment.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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 OnlineDeploymentProperties { - /* - * The resource requirements for the container (cpu and memory). - */ - @JsonProperty(value = "containerResourceRequirements") - private ContainerResourceRequirements containerResourceRequirements; - - /** Creates an instance of KubernetesOnlineDeployment class. */ - public KubernetesOnlineDeployment() { - } - - /** - * 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 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 a361ed5f3a58..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesProperties.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of KubernetesProperties class. */ - public KubernetesProperties() { - } - - /** - * Get the relayConnectionString property: Relay connection string. - * - * @return the relayConnectionString value. - */ - public String relayConnectionString() { - return this.relayConnectionString; - } - - /** - * Set the relayConnectionString property: Relay connection string. - * - * @param relayConnectionString the relayConnectionString value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withRelayConnectionString(String relayConnectionString) { - this.relayConnectionString = relayConnectionString; - return this; - } - - /** - * Get the serviceBusConnectionString property: ServiceBus connection string. - * - * @return the serviceBusConnectionString value. - */ - public String serviceBusConnectionString() { - return this.serviceBusConnectionString; - } - - /** - * Set the serviceBusConnectionString property: ServiceBus connection string. - * - * @param serviceBusConnectionString the serviceBusConnectionString value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withServiceBusConnectionString(String serviceBusConnectionString) { - this.serviceBusConnectionString = serviceBusConnectionString; - return this; - } - - /** - * Get the extensionPrincipalId property: Extension principal-id. - * - * @return the extensionPrincipalId value. - */ - public String extensionPrincipalId() { - return this.extensionPrincipalId; - } - - /** - * Set the extensionPrincipalId property: Extension principal-id. - * - * @param extensionPrincipalId the extensionPrincipalId value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withExtensionPrincipalId(String extensionPrincipalId) { - this.extensionPrincipalId = extensionPrincipalId; - return this; - } - - /** - * Get the extensionInstanceReleaseTrain property: Extension instance release train. - * - * @return the extensionInstanceReleaseTrain value. - */ - public String extensionInstanceReleaseTrain() { - return this.extensionInstanceReleaseTrain; - } - - /** - * Set the extensionInstanceReleaseTrain property: Extension instance release train. - * - * @param extensionInstanceReleaseTrain the extensionInstanceReleaseTrain value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withExtensionInstanceReleaseTrain(String extensionInstanceReleaseTrain) { - this.extensionInstanceReleaseTrain = extensionInstanceReleaseTrain; - return this; - } - - /** - * Get the vcName property: VC name. - * - * @return the vcName value. - */ - public String vcName() { - return this.vcName; - } - - /** - * Set the vcName property: VC name. - * - * @param vcName the vcName value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withVcName(String vcName) { - this.vcName = vcName; - return this; - } - - /** - * Get the namespace property: Compute namespace. - * - * @return the namespace value. - */ - public String namespace() { - return this.namespace; - } - - /** - * Set the namespace property: Compute namespace. - * - * @param namespace the namespace value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withNamespace(String namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get the defaultInstanceType property: Default instance type. - * - * @return the defaultInstanceType value. - */ - public String defaultInstanceType() { - return this.defaultInstanceType; - } - - /** - * Set the defaultInstanceType property: Default instance type. - * - * @param defaultInstanceType the defaultInstanceType value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withDefaultInstanceType(String defaultInstanceType) { - this.defaultInstanceType = defaultInstanceType; - return this; - } - - /** - * Get the instanceTypes property: Instance Type Schema. - * - * @return the instanceTypes value. - */ - public Map instanceTypes() { - return this.instanceTypes; - } - - /** - * Set the instanceTypes property: Instance Type Schema. - * - * @param instanceTypes the instanceTypes value to set. - * @return the KubernetesProperties object itself. - */ - public KubernetesProperties withInstanceTypes(Map instanceTypes) { - this.instanceTypes = instanceTypes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (instanceTypes() != null) { - instanceTypes() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } -} 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 98634b93fcb3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/KubernetesSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** Kubernetes Compute Schema. */ -@Fluent -public class KubernetesSchema { - /* - * Properties of Kubernetes - */ - @JsonProperty(value = "properties") - private KubernetesProperties properties; - - /** Creates an instance of KubernetesSchema class. */ - public KubernetesSchema() { - } - - /** - * Get the properties property: Properties of Kubernetes. - * - * @return the properties value. - */ - public KubernetesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Properties of Kubernetes. - * - * @param properties the properties value to set. - * @return the KubernetesSchema object itself. - */ - public KubernetesSchema withProperties(KubernetesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 1b916e37dd4c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LearningRateScheduler.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; - -/** Learning rate scheduler enum. */ -public final class LearningRateScheduler extends ExpandableStringEnum { - /** Static value None for LearningRateScheduler. */ - public static final LearningRateScheduler NONE = fromString("None"); - - /** Static value WarmupCosine for LearningRateScheduler. */ - public static final LearningRateScheduler WARMUP_COSINE = fromString("WarmupCosine"); - - /** Static value Step for LearningRateScheduler. */ - public static final LearningRateScheduler STEP = fromString("Step"); - - /** - * Creates a new instance of LearningRateScheduler value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LearningRateScheduler() { - } - - /** - * Creates or finds a LearningRateScheduler from its string representation. - * - * @param name a name to look for. - * @return the corresponding LearningRateScheduler. - */ - @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 4eb345cb6c34..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListAmlUserFeatureResult.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.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; - - /** Creates an instance of ListAmlUserFeatureResult class. */ - public ListAmlUserFeatureResult() { - } - - /** - * Get the value property: The list of AML user facing features. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML user features information. Call ListNext() with - * this to fetch the next page of AML user features information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 7ee8bc352a96..000000000000 --- 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 53a4f6c3e392..000000000000 --- 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 dd06b71d3580..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListUsagesResult.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.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; - - /** Creates an instance of ListUsagesResult class. */ - public ListUsagesResult() { - } - - /** - * Get the value property: The list of AML resource usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of AML resource usage information. Call ListNext() with - * this to fetch the next page of AML resource usage information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 8f096a4b8567..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListViewType.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 ListViewType. */ -public final class ListViewType extends ExpandableStringEnum { - /** Static value ActiveOnly for ListViewType. */ - public static final ListViewType ACTIVE_ONLY = fromString("ActiveOnly"); - - /** Static value ArchivedOnly for ListViewType. */ - public static final ListViewType ARCHIVED_ONLY = fromString("ArchivedOnly"); - - /** Static value All for ListViewType. */ - public static final ListViewType ALL = fromString("All"); - - /** - * Creates a new instance of ListViewType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ListViewType() { - } - - /** - * Creates or finds a ListViewType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ListViewType. - */ - @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 37ea530b96fb..000000000000 --- 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 a54a6f6a93f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ListWorkspaceQuotas.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.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; - - /** Creates an instance of ListWorkspaceQuotas class. */ - public ListWorkspaceQuotas() { - } - - /** - * Get the value property: The list of Workspace Quotas by VM Family. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Get the nextLink property: The URI to fetch the next page of workspace quota information by VM Family. Call - * ListNext() with this to fetch the next page of Workspace Quota information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 bd08d1b9305a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LiteralJobInput.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.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; - - /** Creates an instance of LiteralJobInput class. */ - public LiteralJobInput() { - } - - /** - * 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 045fe35c9023..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LoadBalancerType.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; - -/** Load Balancer Type. */ -public final class LoadBalancerType extends ExpandableStringEnum { - /** Static value PublicIp for LoadBalancerType. */ - public static final LoadBalancerType PUBLIC_IP = fromString("PublicIp"); - - /** Static value InternalLoadBalancer for LoadBalancerType. */ - public static final LoadBalancerType INTERNAL_LOAD_BALANCER = fromString("InternalLoadBalancer"); - - /** - * Creates a new instance of LoadBalancerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LoadBalancerType() { - } - - /** - * Creates or finds a LoadBalancerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LoadBalancerType. - */ - @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 0d8fac3b0e25..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/LogVerbosity.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Enum for setting log verbosity. */ -public final class LogVerbosity extends ExpandableStringEnum { - /** Static value NotSet for LogVerbosity. */ - public static final LogVerbosity NOT_SET = fromString("NotSet"); - - /** Static value Debug for LogVerbosity. */ - public static final LogVerbosity DEBUG = fromString("Debug"); - - /** Static value Info for LogVerbosity. */ - public static final LogVerbosity INFO = fromString("Info"); - - /** Static value Warning for LogVerbosity. */ - public static final LogVerbosity WARNING = fromString("Warning"); - - /** Static value Error for LogVerbosity. */ - public static final LogVerbosity ERROR = fromString("Error"); - - /** Static value Critical for LogVerbosity. */ - public static final LogVerbosity CRITICAL = fromString("Critical"); - - /** - * Creates a new instance of LogVerbosity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogVerbosity() { - } - - /** - * Creates or finds a LogVerbosity from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogVerbosity. - */ - @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 375ee999b449..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobInput.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.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("mlflow_model") -@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; - - /** Creates an instance of MLFlowModelJobInput class. */ - public MLFlowModelJobInput() { - } - - /** - * 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 e695c2c2e12c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLFlowModelJobOutput.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 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("mlflow_model") -@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; - - /** Creates an instance of MLFlowModelJobOutput class. */ - public MLFlowModelJobOutput() { - } - - /** - * 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 009f42261a0e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableData.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 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 DataVersionBaseProperties { - /* - * Uris referenced in the MLTable definition (required for lineage) - */ - @JsonProperty(value = "referencedUris") - private List referencedUris; - - /** Creates an instance of MLTableData class. */ - public MLTableData() { - } - - /** - * 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 fa1f992030c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobInput.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.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; - - /** Creates an instance of MLTableJobInput class. */ - public MLTableJobInput() { - } - - /** - * 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 168360d6a015..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MLTableJobOutput.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 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; - - /** Creates an instance of MLTableJobOutput class. */ - public MLTableJobOutput() { - } - - /** - * 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 6ff0f7e2b121..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentity.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ManagedIdentity class. */ - public ManagedIdentity() { - } - - /** - * 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/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index a117d892d277..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedIdentityAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 ManagedIdentityAuthTypeWorkspaceConnectionProperties model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("ManagedIdentity") -@Fluent -public final class ManagedIdentityAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * The credentials property. - */ - @JsonProperty(value = "credentials") - private WorkspaceConnectionManagedIdentity credentials; - - /** Creates an instance of ManagedIdentityAuthTypeWorkspaceConnectionProperties class. */ - public ManagedIdentityAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionManagedIdentity credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the ManagedIdentityAuthTypeWorkspaceConnectionProperties object itself. - */ - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionManagedIdentity credentials) { - this.credentials = credentials; - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** {@inheritDoc} */ - @Override - public ManagedIdentityAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } -} 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 41a6593e52d7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedOnlineDeployment.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.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 OnlineDeploymentProperties { - /** Creates an instance of ManagedOnlineDeployment class. */ - public ManagedOnlineDeployment() { - } - - /** {@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 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 3fc7e30e4fcc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - - /** Creates an instance of ManagedServiceIdentity class. */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * - * @return the tenantId value. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); -} diff --git a/sdk/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 b066c34ad136..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ManagedServiceIdentityType.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** Static value SystemAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** Static value UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - @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 786701cbc548..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MedianStoppingPolicy.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.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 { - /** Creates an instance of MedianStoppingPolicy class. */ - public MedianStoppingPolicy() { - } - - /** {@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/ModelContainer.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.java deleted file mode 100644 index 0841f457eef9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainer.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.ModelContainerInner; - -/** An immutable client-side representation of ModelContainer. */ -public interface ModelContainer { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ModelContainerProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner object. - * - * @return the inner object. - */ - ModelContainerInner innerModel(); - - /** The entirety of the ModelContainer definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ModelContainer definition stages. */ - interface DefinitionStages { - /** The first stage of the ModelContainer definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ModelContainer definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the ModelContainer definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ModelContainerProperties properties); - } - /** - * The stage of the ModelContainer definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ModelContainer create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelContainer create(Context context); - } - } - /** - * Begins update for the ModelContainer resource. - * - * @return the stage of resource update. - */ - ModelContainer.Update update(); - - /** The template for ModelContainer update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelContainer apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelContainer apply(Context context); - } - /** The ModelContainer update stages. */ - interface UpdateStages { - /** The stage of the ModelContainer update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ModelContainerProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelContainer refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelContainer refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.java deleted file mode 100644 index aaf2c9cb402a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerProperties.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 java.util.Map; - -/** The ModelContainerProperties model. */ -@Fluent -public final class ModelContainerProperties extends AssetContainer { - /** Creates an instance of ModelContainerProperties class. */ - public ModelContainerProperties() { - } - - /** {@inheritDoc} */ - @Override - public ModelContainerProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelContainerProperties 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 cccb640d70ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelContainerResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -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; - - /** Creates an instance of ModelContainerResourceArmPaginatedResult class. */ - public ModelContainerResourceArmPaginatedResult() { - } - - /** - * 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 e6173d6d334e..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Delete container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get container. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container. - */ - ModelContainer get(String resourceGroupName, String workspaceName, String name); - - /** - * Get container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - ModelContainer getById(String id); - - /** - * Get container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete container. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete container. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelContainer resource. - * - * @param name resource name. - * @return the first stage of the new ModelContainer definition. - */ - ModelContainer.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.java deleted file mode 100644 index 79c3c14802b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelSize.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; - -/** Image model size. */ -public final class ModelSize extends ExpandableStringEnum { - /** Static value None for ModelSize. */ - public static final ModelSize NONE = fromString("None"); - - /** Static value Small for ModelSize. */ - public static final ModelSize SMALL = fromString("Small"); - - /** Static value Medium for ModelSize. */ - public static final ModelSize MEDIUM = fromString("Medium"); - - /** Static value Large for ModelSize. */ - public static final ModelSize LARGE = fromString("Large"); - - /** Static value ExtraLarge for ModelSize. */ - public static final ModelSize EXTRA_LARGE = fromString("ExtraLarge"); - - /** - * Creates a new instance of ModelSize value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ModelSize() { - } - - /** - * Creates or finds a ModelSize from its string representation. - * - * @param name a name to look for. - * @return the corresponding ModelSize. - */ - @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/ModelVersion.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.java deleted file mode 100644 index 6d8d49f16984..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersion.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.ModelVersionInner; - -/** An immutable client-side representation of ModelVersion. */ -public interface ModelVersion { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ModelVersionProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner object. - * - * @return the inner object. - */ - ModelVersionInner innerModel(); - - /** The entirety of the ModelVersion definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The ModelVersion definition stages. */ - interface DefinitionStages { - /** The first stage of the ModelVersion definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the ModelVersion definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @return the next definition stage. - */ - WithProperties withExistingModel(String resourceGroupName, String workspaceName, String name); - } - /** The stage of the ModelVersion definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ModelVersionProperties properties); - } - /** - * The stage of the ModelVersion definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ModelVersion create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ModelVersion create(Context context); - } - } - /** - * Begins update for the ModelVersion resource. - * - * @return the stage of resource update. - */ - ModelVersion.Update update(); - - /** The template for ModelVersion update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ModelVersion apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ModelVersion apply(Context context); - } - /** The ModelVersion update stages. */ - interface UpdateStages { - /** The stage of the ModelVersion update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ModelVersionProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ModelVersion refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ModelVersion refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java deleted file mode 100644 index 93b7cedb104b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionProperties.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Model asset version details. */ -@Fluent -public final class ModelVersionProperties 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 String modelType; - - /* - * The URI path to the model contents. - */ - @JsonProperty(value = "modelUri") - private String modelUri; - - /** Creates an instance of ModelVersionProperties class. */ - public ModelVersionProperties() { - } - - /** - * Get the flavors property: Mapping of model flavors to their properties. - * - * @return the flavors value. - */ - public Map flavors() { - return this.flavors; - } - - /** - * Set the flavors property: Mapping of model flavors to their properties. - * - * @param flavors the flavors value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withFlavors(Map flavors) { - this.flavors = flavors; - return this; - } - - /** - * Get the jobName property: Name of the training job which produced this model. - * - * @return the jobName value. - */ - public String jobName() { - return this.jobName; - } - - /** - * Set the jobName property: Name of the training job which produced this model. - * - * @param jobName the jobName value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withJobName(String jobName) { - this.jobName = jobName; - return this; - } - - /** - * Get the modelType property: The storage format for this entity. Used for NCD. - * - * @return the modelType value. - */ - public String modelType() { - return this.modelType; - } - - /** - * Set the modelType property: The storage format for this entity. Used for NCD. - * - * @param modelType the modelType value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withModelType(String modelType) { - this.modelType = modelType; - return this; - } - - /** - * Get the modelUri property: The URI path to the model contents. - * - * @return the modelUri value. - */ - public String modelUri() { - return this.modelUri; - } - - /** - * Set the modelUri property: The URI path to the model contents. - * - * @param modelUri the modelUri value to set. - * @return the ModelVersionProperties object itself. - */ - public ModelVersionProperties withModelUri(String modelUri) { - this.modelUri = modelUri; - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionProperties withIsAnonymous(Boolean isAnonymous) { - super.withIsAnonymous(isAnonymous); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionProperties withIsArchived(Boolean isArchived) { - super.withIsArchived(isArchived); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ModelVersionProperties 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 c5a4f372df03..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ModelVersionResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -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; - - /** Creates an instance of ModelVersionResourceArmPaginatedResult class. */ - public ModelVersionResourceArmPaginatedResult() { - } - - /** - * 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 050389e0716e..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Delete version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String name, String version, Context context); - - /** - * Get version. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Container name. This is case-sensitive. - * @param version Version identifier. This is case-sensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version. - */ - ModelVersion get(String resourceGroupName, String workspaceName, String name, String version); - - /** - * Get version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - ModelVersion getById(String id); - - /** - * Get version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return version along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete version. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete version. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ModelVersion resource. - * - * @param name resource name. - * @return the first stage of the new ModelVersion definition. - */ - ModelVersion.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.java deleted file mode 100644 index ea7e3aa4d0e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountAction.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; - -/** Mount Action. */ -public final class MountAction extends ExpandableStringEnum { - /** Static value Mount for MountAction. */ - public static final MountAction MOUNT = fromString("Mount"); - - /** Static value Unmount for MountAction. */ - public static final MountAction UNMOUNT = fromString("Unmount"); - - /** - * Creates a new instance of MountAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MountAction() { - } - - /** - * Creates or finds a MountAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountAction. - */ - @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 4682b1947630..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/MountState.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Mount state. */ -public final class MountState extends ExpandableStringEnum { - /** Static value MountRequested for MountState. */ - public static final MountState MOUNT_REQUESTED = fromString("MountRequested"); - - /** Static value Mounted for MountState. */ - public static final MountState MOUNTED = fromString("Mounted"); - - /** Static value MountFailed for MountState. */ - public static final MountState MOUNT_FAILED = fromString("MountFailed"); - - /** Static value UnmountRequested for MountState. */ - public static final MountState UNMOUNT_REQUESTED = fromString("UnmountRequested"); - - /** Static value UnmountFailed for MountState. */ - public static final MountState UNMOUNT_FAILED = fromString("UnmountFailed"); - - /** Static value Unmounted for MountState. */ - public static final MountState UNMOUNTED = fromString("Unmounted"); - - /** - * Creates a new instance of MountState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public MountState() { - } - - /** - * Creates or finds a MountState from its string representation. - * - * @param name a name to look for. - * @return the corresponding MountState. - */ - @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 3aacc74147d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Mpi.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.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; - - /** Creates an instance of Mpi class. */ - public Mpi() { - } - - /** - * 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 8613307ed6c0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidations.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.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 { - /** Creates an instance of NCrossValidations class. */ - public 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 2aff7dcb0c65..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NCrossValidationsMode.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; - -/** Determines how N-Cross validations value is determined. */ -public final class NCrossValidationsMode extends ExpandableStringEnum { - /** Static value Auto for NCrossValidationsMode. */ - public static final NCrossValidationsMode AUTO = fromString("Auto"); - - /** Static value Custom for NCrossValidationsMode. */ - public static final NCrossValidationsMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of NCrossValidationsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NCrossValidationsMode() { - } - - /** - * Creates or finds a NCrossValidationsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding NCrossValidationsMode. - */ - @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 bf7109d15c4a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Network.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; - -/** network of this container. */ -public final class Network extends ExpandableStringEnum { - /** Static value Bridge for Network. */ - public static final Network BRIDGE = fromString("Bridge"); - - /** Static value Host for Network. */ - public static final Network HOST = fromString("Host"); - - /** - * Creates a new instance of Network value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Network() { - } - - /** - * Creates or finds a Network from its string representation. - * - * @param name a name to look for. - * @return the corresponding Network. - */ - @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 deab5558f701..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVertical.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.JsonProperty; - -/** Abstract class for NLP related AutoML tasks. NLP - Natural Language Processing. */ -@Fluent -public class NlpVertical { - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /** Creates an instance of NlpVertical class. */ - public NlpVertical() { - } - - /** - * 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; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the NlpVertical object itself. - */ - public NlpVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().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 fa5c771710db..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalFeaturizationSettings.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.Fluent; - -/** The NlpVerticalFeaturizationSettings model. */ -@Fluent -public final class NlpVerticalFeaturizationSettings extends FeaturizationSettings { - /** Creates an instance of NlpVerticalFeaturizationSettings class. */ - public NlpVerticalFeaturizationSettings() { - } - - /** {@inheritDoc} */ - @Override - public NlpVerticalFeaturizationSettings withDatasetLanguage(String datasetLanguage) { - super.withDatasetLanguage(datasetLanguage); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 82dddc5df409..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NlpVerticalLimitSettings.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of NlpVerticalLimitSettings class. */ - public NlpVerticalLimitSettings() { - } - - /** - * 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/NodeState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.java deleted file mode 100644 index ea30f45a6afb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeState.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted. */ -public final class NodeState extends ExpandableStringEnum { - /** Static value idle for NodeState. */ - public static final NodeState IDLE = fromString("idle"); - - /** Static value running for NodeState. */ - public static final NodeState RUNNING = fromString("running"); - - /** Static value preparing for NodeState. */ - public static final NodeState PREPARING = fromString("preparing"); - - /** Static value unusable for NodeState. */ - public static final NodeState UNUSABLE = fromString("unusable"); - - /** Static value leaving for NodeState. */ - public static final NodeState LEAVING = fromString("leaving"); - - /** Static value preempted for NodeState. */ - public static final NodeState PREEMPTED = fromString("preempted"); - - /** - * Creates a new instance of NodeState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public NodeState() { - } - - /** - * Creates or finds a NodeState from its string representation. - * - * @param name a name to look for. - * @return the corresponding NodeState. - */ - @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 a7004e0e8690..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NodeStateCounts.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.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; - - /** Creates an instance of NodeStateCounts class. */ - public NodeStateCounts() { - } - - /** - * 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/NoneAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 79af891099d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneAuthTypeWorkspaceConnectionProperties.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.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The NoneAuthTypeWorkspaceConnectionProperties model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("None") -@Fluent -public final class NoneAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /** Creates an instance of NoneAuthTypeWorkspaceConnectionProperties class. */ - public NoneAuthTypeWorkspaceConnectionProperties() { - } - - /** {@inheritDoc} */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** {@inheritDoc} */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** {@inheritDoc} */ - @Override - public NoneAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - } -} 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 01b0ba236604..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NoneDatastoreCredentials.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.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 { - /** Creates an instance of NoneDatastoreCredentials class. */ - public NoneDatastoreCredentials() { - } - - /** - * 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 4e28342a32c7..000000000000 --- 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 ab2aef26e6b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/NotebookPreparationError.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; - -/** 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; - - /** Creates an instance of NotebookPreparationError class. */ - public NotebookPreparationError() { - } - - /** - * Get the errorMessage property: The errorMessage property. - * - * @return the errorMessage value. - */ - public String errorMessage() { - return this.errorMessage; - } - - /** - * Set the errorMessage property: The errorMessage property. - * - * @param errorMessage the errorMessage value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - return this; - } - - /** - * Get the statusCode property: The statusCode property. - * - * @return the statusCode value. - */ - public Integer statusCode() { - return this.statusCode; - } - - /** - * Set the statusCode property: The statusCode property. - * - * @param statusCode the statusCode value to set. - * @return the NotebookPreparationError object itself. - */ - public NotebookPreparationError withStatusCode(Integer statusCode) { - this.statusCode = statusCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f8aa5bb01e78..000000000000 --- 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 4bef9028bdad..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ObjectDetectionPrimaryMetrics.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; - -/** Primary metrics for Image ObjectDetection task. */ -public final class ObjectDetectionPrimaryMetrics extends ExpandableStringEnum { - /** Static value MeanAveragePrecision for ObjectDetectionPrimaryMetrics. */ - public static final ObjectDetectionPrimaryMetrics MEAN_AVERAGE_PRECISION = fromString("MeanAveragePrecision"); - - /** - * Creates a new instance of ObjectDetectionPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ObjectDetectionPrimaryMetrics() { - } - - /** - * Creates or finds a ObjectDetectionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding ObjectDetectionPrimaryMetrics. - */ - @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 bd09112175ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Objective.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - - /** Creates an instance of Objective class. */ - public Objective() { - } - - /** - * 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/OnlineDeployment.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java deleted file mode 100644 index 2a4d9145dae6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployment.java +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import java.util.Map; - -/** An immutable client-side representation of OnlineDeployment. */ -public interface OnlineDeployment { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the 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. - */ - OnlineDeploymentProperties 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.OnlineDeploymentInner object. - * - * @return the inner object. - */ - OnlineDeploymentInner innerModel(); - - /** The entirety of the OnlineDeployment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The OnlineDeployment definition stages. */ - interface DefinitionStages { - /** The first stage of the OnlineDeployment definition. */ - interface Blank extends WithLocation { - } - /** The stage of the OnlineDeployment definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the OnlineDeployment definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName, endpointName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @return the next definition stage. - */ - WithProperties withExistingOnlineEndpoint( - String resourceGroupName, String workspaceName, String endpointName); - } - /** The stage of the OnlineDeployment definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(OnlineDeploymentProperties properties); - } - /** - * The stage of the OnlineDeployment definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineDeployment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineDeployment create(Context context); - } - /** The stage of the OnlineDeployment definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the OnlineDeployment definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the OnlineDeployment definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - /** The stage of the OnlineDeployment definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - /** - * Begins update for the OnlineDeployment resource. - * - * @return the stage of resource update. - */ - OnlineDeployment.Update update(); - - /** The template for OnlineDeployment update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithSku { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineDeployment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineDeployment apply(Context context); - } - /** The OnlineDeployment update stages. */ - interface UpdateStages { - /** The stage of the OnlineDeployment update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the OnlineDeployment update allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - Update withSku(PartialSku sku); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OnlineDeployment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineDeployment refresh(Context context); - - /** - * Polls an Endpoint operation. - * - * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response getLogsWithResponse(DeploymentLogsRequest body, Context context); - - /** - * Polls an Endpoint operation. - * - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DeploymentLogs getLogs(DeploymentLogsRequest body); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java deleted file mode 100644 index fff47cc6a83f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentProperties.java +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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 OnlineDeploymentProperties model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "endpointComputeType", - defaultImpl = OnlineDeploymentProperties.class) -@JsonTypeName("OnlineDeploymentProperties") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Kubernetes", value = KubernetesOnlineDeployment.class), - @JsonSubTypes.Type(name = "Managed", value = ManagedOnlineDeployment.class) -}) -@Fluent -public class OnlineDeploymentProperties 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; - - /* - * 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; - - /** Creates an instance of OnlineDeploymentProperties class. */ - public OnlineDeploymentProperties() { - } - - /** - * Get the appInsightsEnabled property: If true, enables Application Insights logging. - * - * @return the appInsightsEnabled value. - */ - public Boolean appInsightsEnabled() { - return this.appInsightsEnabled; - } - - /** - * Set the appInsightsEnabled property: If true, enables Application Insights logging. - * - * @param appInsightsEnabled the appInsightsEnabled value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withAppInsightsEnabled(Boolean appInsightsEnabled) { - this.appInsightsEnabled = appInsightsEnabled; - return this; - } - - /** - * Get the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. - * - * @return the egressPublicNetworkAccess value. - */ - public EgressPublicNetworkAccessType egressPublicNetworkAccess() { - return this.egressPublicNetworkAccess; - } - - /** - * Set the egressPublicNetworkAccess property: If Enabled, allow egress public network access. If Disabled, this - * will create secure egress. Default: Enabled. - * - * @param egressPublicNetworkAccess the egressPublicNetworkAccess value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withEgressPublicNetworkAccess( - EgressPublicNetworkAccessType egressPublicNetworkAccess) { - this.egressPublicNetworkAccess = egressPublicNetworkAccess; - return this; - } - - /** - * Get the instanceType property: Compute instance type. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Compute instance type. - * - * @param instanceType the instanceType value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the livenessProbe property: Liveness probe monitors the health of the container regularly. - * - * @return the livenessProbe value. - */ - public ProbeSettings livenessProbe() { - return this.livenessProbe; - } - - /** - * Set the livenessProbe property: Liveness probe monitors the health of the container regularly. - * - * @param livenessProbe the livenessProbe value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withLivenessProbe(ProbeSettings livenessProbe) { - this.livenessProbe = livenessProbe; - return this; - } - - /** - * Get the model property: The URI path to the model. - * - * @return the model value. - */ - public String model() { - return this.model; - } - - /** - * Set the model property: The URI path to the model. - * - * @param model the model value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withModel(String model) { - this.model = model; - return this; - } - - /** - * Get the modelMountPath property: The path to mount the model in custom container. - * - * @return the modelMountPath value. - */ - public String modelMountPath() { - return this.modelMountPath; - } - - /** - * Set the modelMountPath property: The path to mount the model in custom container. - * - * @param modelMountPath the modelMountPath value to set. - * @return the OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withModelMountPath(String modelMountPath) { - this.modelMountPath = modelMountPath; - return this; - } - - /** - * Get the 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 OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties 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 OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties 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 OnlineDeploymentProperties object itself. - */ - public OnlineDeploymentProperties withScaleSettings(OnlineScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentProperties withCodeConfiguration(CodeConfiguration codeConfiguration) { - super.withCodeConfiguration(codeConfiguration); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentProperties withEnvironmentId(String environmentId) { - super.withEnvironmentId(environmentId); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentProperties withEnvironmentVariables(Map environmentVariables) { - super.withEnvironmentVariables(environmentVariables); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineDeploymentProperties 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 b9915874b1ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeploymentTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -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; - - /** Creates an instance of OnlineDeploymentTrackedResourceArmPaginatedResult class. */ - public OnlineDeploymentTrackedResourceArmPaginatedResult() { - } - - /** - * 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 4e07db5be0f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineDeployments.java +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of OnlineDeployments. */ -public interface OnlineDeployments { - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List Inference Endpoint Deployments. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param orderBy Ordering of list. - * @param top Top of list. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of OnlineDeployment entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String endpointName, - String orderBy, - Integer top, - String skip, - Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName, Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment. - */ - OnlineDeployment get(String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response getLogsWithResponse( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body, - Context context); - - /** - * Polls an Endpoint operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName The name and identifier for the endpoint. - * @param body The request containing parameters for retrieving logs. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DeploymentLogs getLogs( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - DeploymentLogsRequest body); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listSkus( - String resourceGroupName, String workspaceName, String endpointName, String deploymentName); - - /** - * List Inference Endpoint Deployment Skus. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Inference endpoint name. - * @param deploymentName Inference Endpoint Deployment name. - * @param count Number of Skus to be retrieved in a page of results. - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of SkuResource entities as paginated response with {@link PagedIterable}. - */ - PagedIterable listSkus( - String resourceGroupName, - String workspaceName, - String endpointName, - String deploymentName, - Integer count, - String skip, - Context context); - - /** - * Get Inference Deployment Deployment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. - */ - OnlineDeployment getById(String id); - - /** - * Get Inference Deployment Deployment. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return inference Deployment Deployment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete Inference Endpoint Deployment (asynchronous). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OnlineDeployment resource. - * - * @param name resource name. - * @return the first stage of the new OnlineDeployment definition. - */ - OnlineDeployment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java deleted file mode 100644 index 45e3b1948649..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpoint.java +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import java.util.Map; - -/** An immutable client-side representation of OnlineEndpoint. */ -public interface OnlineEndpoint { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the 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. - */ - OnlineEndpointProperties 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.OnlineEndpointInner object. - * - * @return the inner object. - */ - OnlineEndpointInner innerModel(); - - /** The entirety of the OnlineEndpoint definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The OnlineEndpoint definition stages. */ - interface DefinitionStages { - /** The first stage of the OnlineEndpoint definition. */ - interface Blank extends WithLocation { - } - /** The stage of the OnlineEndpoint definition allowing to specify location. */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - /** The stage of the OnlineEndpoint definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the OnlineEndpoint definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(OnlineEndpointProperties properties); - } - /** - * The stage of the OnlineEndpoint definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithKind, - DefinitionStages.WithSku { - /** - * Executes the create request. - * - * @return the created resource. - */ - OnlineEndpoint create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - OnlineEndpoint create(Context context); - } - /** The stage of the OnlineEndpoint definition allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - /** The stage of the OnlineEndpoint definition allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - /** The stage of the OnlineEndpoint definition allowing to specify kind. */ - interface WithKind { - /** - * Specifies the kind property: Metadata used by portal/tooling/etc to render different UX experiences for - * resources of the same type.. - * - * @param kind Metadata used by portal/tooling/etc to render different UX experiences for resources of the - * same type. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - /** The stage of the OnlineEndpoint definition allowing to specify sku. */ - interface WithSku { - /** - * Specifies the sku property: Sku details required for ARM contract for Autoscaling.. - * - * @param sku Sku details required for ARM contract for Autoscaling. - * @return the next definition stage. - */ - WithCreate withSku(Sku sku); - } - } - /** - * Begins update for the OnlineEndpoint resource. - * - * @return the stage of resource update. - */ - OnlineEndpoint.Update update(); - - /** The template for OnlineEndpoint update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity { - /** - * Executes the update request. - * - * @return the updated resource. - */ - OnlineEndpoint apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - OnlineEndpoint apply(Context context); - } - /** The OnlineEndpoint update stages. */ - interface UpdateStages { - /** The stage of the OnlineEndpoint update allowing to specify tags. */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - /** The stage of the OnlineEndpoint update allowing to specify identity. */ - interface WithIdentity { - /** - * Specifies the identity property: Managed service identity (system assigned and/or user assigned - * identities). - * - * @param identity Managed service identity (system assigned and/or user assigned identities). - * @return the next definition stage. - */ - Update withIdentity(PartialManagedServiceIdentity identity); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - OnlineEndpoint refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - OnlineEndpoint refresh(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys(RegenerateEndpointKeysRequest body, Context context); - - /** - * Retrieve a valid 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); - - /** - * 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(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java deleted file mode 100644 index ae7b1c483c58..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointProperties.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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 OnlineEndpointProperties extends EndpointPropertiesBaseInner { - /* - * ARM resource ID of the compute if it exists. - * optional - */ - @JsonProperty(value = "compute") - private String compute; - - /* - * 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; - - /** Creates an instance of OnlineEndpointProperties class. */ - public OnlineEndpointProperties() { - } - - /** - * Get the compute property: ARM resource ID of the compute if it exists. optional. - * - * @return the compute value. - */ - public String compute() { - return this.compute; - } - - /** - * Set the compute property: ARM resource ID of the compute if it exists. optional. - * - * @param compute the compute value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withCompute(String compute) { - this.compute = compute; - return this; - } - - /** - * Get the 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 OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @return the traffic value. - */ - public Map traffic() { - return this.traffic; - } - - /** - * Set the traffic property: Percentage of traffic from endpoint to divert to each deployment. Traffic values need - * to sum to 100. - * - * @param traffic the traffic value to set. - * @return the OnlineEndpointProperties object itself. - */ - public OnlineEndpointProperties withTraffic(Map traffic) { - this.traffic = traffic; - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointProperties withAuthMode(EndpointAuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointProperties withKeys(EndpointAuthKeysInner keys) { - super.withKeys(keys); - return this; - } - - /** {@inheritDoc} */ - @Override - public OnlineEndpointProperties 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 d675ed3a4464..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineEndpointTrackedResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -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; - - /** Creates an instance of OnlineEndpointTrackedResourceArmPaginatedResult class. */ - public OnlineEndpointTrackedResourceArmPaginatedResult() { - } - - /** - * 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 44e3dd0a8069..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * Get Online Endpoint. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint. - */ - OnlineEndpoint get(String resourceGroupName, String workspaceName, String endpointName); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication along with {@link Response}. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, String endpointName, Context context); - - /** - * List EndpointAuthKeys for an Endpoint using Key-based authentication. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return keys for endpoint authentication. - */ - EndpointAuthKeys listKeys(String resourceGroupName, String workspaceName, String endpointName); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys( - String resourceGroupName, String workspaceName, String endpointName, RegenerateEndpointKeysRequest body); - - /** - * Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous). - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param endpointName Online Endpoint name. - * @param body RegenerateKeys request . - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void regenerateKeys( - String resourceGroupName, - String workspaceName, - String endpointName, - RegenerateEndpointKeysRequest body, - Context context); - - /** - * Retrieve a valid 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); - - /** - * 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); - - /** - * Get Online Endpoint. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. - */ - OnlineEndpoint getById(String id); - - /** - * Get Online Endpoint. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return online Endpoint along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete Online Endpoint (asynchronous). - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new OnlineEndpoint resource. - * - * @param name resource name. - * @return the first stage of the new OnlineEndpoint definition. - */ - OnlineEndpoint.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.java deleted file mode 100644 index a6f6c9d9ee8d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineRequestSettings.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.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; - - /** Creates an instance of OnlineRequestSettings class. */ - public OnlineRequestSettings() { - } - - /** - * 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 e8acef559320..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OnlineScaleSettings.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.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 { - /** Creates an instance of OnlineScaleSettings class. */ - public 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 f976eb401acb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperatingSystemType.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; - -/** The type of operating system. */ -public final class OperatingSystemType extends ExpandableStringEnum { - /** Static value Linux for OperatingSystemType. */ - public static final OperatingSystemType LINUX = fromString("Linux"); - - /** Static value Windows for OperatingSystemType. */ - public static final OperatingSystemType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of OperatingSystemType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperatingSystemType() { - } - - /** - * Creates or finds a OperatingSystemType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperatingSystemType. - */ - @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 1b428d2aeefd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationName.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Name of the last operation. */ -public final class OperationName extends ExpandableStringEnum { - /** Static value Create for OperationName. */ - public static final OperationName CREATE = fromString("Create"); - - /** Static value Start for OperationName. */ - public static final OperationName START = fromString("Start"); - - /** Static value Stop for OperationName. */ - public static final OperationName STOP = fromString("Stop"); - - /** Static value Restart for OperationName. */ - public static final OperationName RESTART = fromString("Restart"); - - /** Static value Reimage for OperationName. */ - public static final OperationName REIMAGE = fromString("Reimage"); - - /** Static value Delete for OperationName. */ - public static final OperationName DELETE = fromString("Delete"); - - /** - * Creates a new instance of OperationName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationName() { - } - - /** - * Creates or finds a OperationName from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationName. - */ - @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 af28ce807caa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationStatus.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Operation status. */ -public final class OperationStatus extends ExpandableStringEnum { - /** Static value InProgress for OperationStatus. */ - public static final OperationStatus IN_PROGRESS = fromString("InProgress"); - - /** Static value Succeeded for OperationStatus. */ - public static final OperationStatus SUCCEEDED = fromString("Succeeded"); - - /** Static value CreateFailed for OperationStatus. */ - public static final OperationStatus CREATE_FAILED = fromString("CreateFailed"); - - /** Static value StartFailed for OperationStatus. */ - public static final OperationStatus START_FAILED = fromString("StartFailed"); - - /** Static value StopFailed for OperationStatus. */ - public static final OperationStatus STOP_FAILED = fromString("StopFailed"); - - /** Static value RestartFailed for OperationStatus. */ - public static final OperationStatus RESTART_FAILED = fromString("RestartFailed"); - - /** Static value ReimageFailed for OperationStatus. */ - public static final OperationStatus REIMAGE_FAILED = fromString("ReimageFailed"); - - /** Static value DeleteFailed for OperationStatus. */ - public static final OperationStatus DELETE_FAILED = fromString("DeleteFailed"); - - /** - * Creates a new instance of OperationStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationStatus() { - } - - /** - * Creates or finds a OperationStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationStatus. - */ - @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 f4ea809c4542..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OperationTrigger.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; - -/** Trigger of operation. */ -public final class OperationTrigger extends ExpandableStringEnum { - /** Static value User for OperationTrigger. */ - public static final OperationTrigger USER = fromString("User"); - - /** Static value Schedule for OperationTrigger. */ - public static final OperationTrigger SCHEDULE = fromString("Schedule"); - - /** Static value IdleShutdown for OperationTrigger. */ - public static final OperationTrigger IDLE_SHUTDOWN = fromString("IdleShutdown"); - - /** - * Creates a new instance of OperationTrigger value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OperationTrigger() { - } - - /** - * Creates or finds a OperationTrigger from its string representation. - * - * @param name a name to look for. - * @return the corresponding OperationTrigger. - */ - @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 d718ecc7e6d5..000000000000 --- 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 5bf732b45abf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OrderString.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 OrderString. */ -public final class OrderString extends ExpandableStringEnum { - /** Static value CreatedAtDesc for OrderString. */ - public static final OrderString CREATED_AT_DESC = fromString("CreatedAtDesc"); - - /** Static value CreatedAtAsc for OrderString. */ - public static final OrderString CREATED_AT_ASC = fromString("CreatedAtAsc"); - - /** Static value UpdatedAtDesc for OrderString. */ - public static final OrderString UPDATED_AT_DESC = fromString("UpdatedAtDesc"); - - /** Static value UpdatedAtAsc for OrderString. */ - public static final OrderString UPDATED_AT_ASC = fromString("UpdatedAtAsc"); - - /** - * Creates a new instance of OrderString value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OrderString() { - } - - /** - * Creates or finds a OrderString from its string representation. - * - * @param name a name to look for. - * @return the corresponding OrderString. - */ - @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 bbb3fd3a428d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OsType.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; - -/** Compute OS Type. */ -public final class OsType extends ExpandableStringEnum { - /** Static value Linux for OsType. */ - public static final OsType LINUX = fromString("Linux"); - - /** Static value Windows for OsType. */ - public static final OsType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of OsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OsType() { - } - - /** - * Creates or finds a OsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding OsType. - */ - @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 dc75b9e54bee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputDeliveryMode.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; - -/** Output data delivery mode enums. */ -public final class OutputDeliveryMode extends ExpandableStringEnum { - /** Static value ReadWriteMount for OutputDeliveryMode. */ - public static final OutputDeliveryMode READ_WRITE_MOUNT = fromString("ReadWriteMount"); - - /** Static value Upload for OutputDeliveryMode. */ - public static final OutputDeliveryMode UPLOAD = fromString("Upload"); - - /** - * Creates a new instance of OutputDeliveryMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public OutputDeliveryMode() { - } - - /** - * Creates or finds a OutputDeliveryMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding OutputDeliveryMode. - */ - @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 c265ff06432d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/OutputPathAssetReference.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.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; - - /** Creates an instance of OutputPathAssetReference class. */ - public OutputPathAssetReference() { - } - - /** - * 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 00d74767a9e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PaginatedComputeResourcesList.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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; - - /** Creates an instance of PaginatedComputeResourcesList class. */ - public PaginatedComputeResourcesList() { - } - - /** - * Get the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of Machine Learning compute objects wrapped in ARM resource envelope. - * - * @param value the value value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: A continuation link (absolute URI) to the next page of results in the list. - * - * @param nextLink the nextLink value to set. - * @return the PaginatedComputeResourcesList object itself. - */ - public PaginatedComputeResourcesList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 0be11f6793e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeployment.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; - -/** Mutable batch inference settings per deployment. */ -@Fluent -public final class PartialBatchDeployment { - /* - * Description of the endpoint deployment. - */ - @JsonProperty(value = "description") - private String description; - - /** Creates an instance of PartialBatchDeployment class. */ - public PartialBatchDeployment() { - } - - /** - * Get the description property: Description of the endpoint deployment. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the endpoint deployment. - * - * @param description the description value to set. - * @return the PartialBatchDeployment object itself. - */ - public PartialBatchDeployment withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java deleted file mode 100644 index aaef56977330..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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 PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { - /* - * Additional attributes of the entity. - */ - @JsonProperty(value = "properties") - private PartialBatchDeployment properties; - - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** Creates an instance of PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties class. */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() { - } - - /** - * Get the properties property: Additional attributes of the entity. - * - * @return the properties value. - */ - public PartialBatchDeployment properties() { - return this.properties; - } - - /** - * Set the properties property: Additional attributes of the entity. - * - * @param properties the properties value to set. - * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. - */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withProperties( - PartialBatchDeployment properties) { - this.properties = properties; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties object itself. - */ - public PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 1939e23433ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialManagedServiceIdentity.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - - /** Creates an instance of PartialManagedServiceIdentity class. */ - public PartialManagedServiceIdentity() { - } - - /** - * Get the type property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Managed service identity (system assigned and/or user assigned identities). - * - * @param type the type value to set. - * @return the PartialManagedServiceIdentity object itself. - */ - public PartialManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the PartialManagedServiceIdentity object itself. - */ - public PartialManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.java deleted file mode 100644 index 81b9958b58d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResource.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.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public class PartialMinimalTrackedResource { - /* - * Resource tags. - */ - @JsonProperty(value = "tags") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map tags; - - /** Creates an instance of PartialMinimalTrackedResource class. */ - public PartialMinimalTrackedResource() { - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the PartialMinimalTrackedResource object itself. - */ - public PartialMinimalTrackedResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.java deleted file mode 100644 index 7187063fa6cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithIdentity.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 java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public class PartialMinimalTrackedResourceWithIdentity extends PartialMinimalTrackedResource { - /* - * Managed service identity (system assigned and/or user assigned identities) - */ - @JsonProperty(value = "identity") - private PartialManagedServiceIdentity identity; - - /** Creates an instance of PartialMinimalTrackedResourceWithIdentity class. */ - public PartialMinimalTrackedResourceWithIdentity() { - } - - /** - * Get the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @return the identity value. - */ - public PartialManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed service identity (system assigned and/or user assigned identities). - * - * @param identity the identity value to set. - * @return the PartialMinimalTrackedResourceWithIdentity object itself. - */ - public PartialMinimalTrackedResourceWithIdentity withIdentity(PartialManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** {@inheritDoc} */ - @Override - public PartialMinimalTrackedResourceWithIdentity withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (identity() != null) { - identity().validate(); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.java deleted file mode 100644 index fd014366f411..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialMinimalTrackedResourceWithSku.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 java.util.Map; - -/** Strictly used in update requests. */ -@Fluent -public final class PartialMinimalTrackedResourceWithSku extends PartialMinimalTrackedResource { - /* - * Sku details required for ARM contract for Autoscaling. - */ - @JsonProperty(value = "sku") - private PartialSku sku; - - /** Creates an instance of PartialMinimalTrackedResourceWithSku class. */ - public PartialMinimalTrackedResourceWithSku() { - } - - /** - * Get the sku property: Sku details required for ARM contract for Autoscaling. - * - * @return the sku value. - */ - public PartialSku sku() { - return this.sku; - } - - /** - * Set the sku property: Sku details required for ARM contract for Autoscaling. - * - * @param sku the sku value to set. - * @return the PartialMinimalTrackedResourceWithSku object itself. - */ - public PartialMinimalTrackedResourceWithSku withSku(PartialSku sku) { - this.sku = sku; - return this; - } - - /** {@inheritDoc} */ - @Override - public PartialMinimalTrackedResourceWithSku withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (sku() != null) { - sku().validate(); - } - } -} 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 a5220a7d8207..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PartialSku.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of PartialSku class. */ - public PartialSku() { - } - - /** - * 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 2b2e387338f8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Password.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; - -/** 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; - - /** Creates an instance of Password class. */ - public Password() { - } - - /** - * Get the name property: The name property. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 068f4b6b123a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PatAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 PatAuthTypeWorkspaceConnectionProperties model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("PAT") -@Fluent -public final class PatAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * The credentials property. - */ - @JsonProperty(value = "credentials") - private WorkspaceConnectionPersonalAccessToken credentials; - - /** Creates an instance of PatAuthTypeWorkspaceConnectionProperties class. */ - public PatAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionPersonalAccessToken credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the PatAuthTypeWorkspaceConnectionProperties object itself. - */ - public PatAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionPersonalAccessToken credentials) { - this.credentials = credentials; - return this; - } - - /** {@inheritDoc} */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** {@inheritDoc} */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** {@inheritDoc} */ - @Override - public PatAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } -} 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 acf0346afd9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PersonalComputeInstanceSettings.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.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; - - /** Creates an instance of PersonalComputeInstanceSettings class. */ - public PersonalComputeInstanceSettings() { - } - - /** - * Get the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @return the assignedUser value. - */ - public AssignedUser assignedUser() { - return this.assignedUser; - } - - /** - * Set the assignedUser property: A user explicitly assigned to a personal compute instance. - * - * @param assignedUser the assignedUser value to set. - * @return the PersonalComputeInstanceSettings object itself. - */ - public PersonalComputeInstanceSettings withAssignedUser(AssignedUser assignedUser) { - this.assignedUser = assignedUser; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (assignedUser() != null) { - assignedUser().validate(); - } - } -} 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 38dd2499a528..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PipelineJob.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.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 JobBaseProperties { - /* - * 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; - - /* - * ARM resource ID of source job. - */ - @JsonProperty(value = "sourceJobId") - private String sourceJobId; - - /** Creates an instance of PipelineJob class. */ - public PipelineJob() { - } - - /** - * 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; - } - - /** - * Get the sourceJobId property: ARM resource ID of source job. - * - * @return the sourceJobId value. - */ - public String sourceJobId() { - return this.sourceJobId; - } - - /** - * Set the sourceJobId property: ARM resource ID of source job. - * - * @param sourceJobId the sourceJobId value to set. - * @return the PipelineJob object itself. - */ - public PipelineJob withSourceJobId(String sourceJobId) { - this.sourceJobId = sourceJobId; - return this; - } - - /** {@inheritDoc} */ - @Override - public PipelineJob withComponentId(String componentId) { - super.withComponentId(componentId); - 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 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 7d3cdfb6741b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpoint.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; - -/** 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; - - /** Creates an instance of PrivateEndpoint class. */ - public PrivateEndpoint() { - } - - /** - * Get the id property: The ARM identifier for Private Endpoint. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * 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 18d85548f8cb..000000000000 --- 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 b6f3c0c8b9b1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.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; - - /** Creates an instance of PrivateEndpointConnectionListResult class. */ - public PrivateEndpointConnectionListResult() { - } - - /** - * Get the value property: Array of private endpoint connections. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Array of private endpoint connections. - * - * @param value the value value to set. - * @return the PrivateEndpointConnectionListResult object itself. - */ - public PrivateEndpointConnectionListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 1caa6c114b4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointConnectionProvisioningState.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** The current provisioning state. */ -public final class PrivateEndpointConnectionProvisioningState - extends ExpandableStringEnum { - /** Static value Succeeded for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Creating for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); - - /** Static value Failed for PrivateEndpointConnectionProvisioningState. */ - public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); - - /** - * Creates a new instance of PrivateEndpointConnectionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointConnectionProvisioningState() { - } - - /** - * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointConnectionProvisioningState. - */ - @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 c660b6ad5ca1..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace. - */ - PrivateEndpointConnection get(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String privateEndpointConnectionName, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param privateEndpointConnectionName The name of the private endpoint connection associated with the workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String privateEndpointConnectionName); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. - */ - PrivateEndpointConnection getById(String id); - - /** - * Gets the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified private endpoint connection associated with the workspace along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes the specified private endpoint connection associated with the workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new PrivateEndpointConnection resource. - * - * @param name resource name. - * @return the first stage of the new PrivateEndpointConnection definition. - */ - PrivateEndpointConnection.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.java deleted file mode 100644 index 0173735ec357..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateEndpointServiceConnectionStatus.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; - -/** The private endpoint connection status. */ -public final class PrivateEndpointServiceConnectionStatus - extends ExpandableStringEnum { - /** Static value Pending for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); - - /** Static value Approved for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); - - /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); - - /** Static value Disconnected for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); - - /** Static value Timeout for PrivateEndpointServiceConnectionStatus. */ - public static final PrivateEndpointServiceConnectionStatus TIMEOUT = fromString("Timeout"); - - /** - * Creates a new instance of PrivateEndpointServiceConnectionStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PrivateEndpointServiceConnectionStatus() { - } - - /** - * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding PrivateEndpointServiceConnectionStatus. - */ - @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 a98acd180051..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkResource.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.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; - - /** Creates an instance of PrivateLinkResource class. */ - public PrivateLinkResource() { - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private PrivateLinkResourceProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the location property: Specifies the location of the resource. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Specifies the location of the resource. - * - * @param location the location value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the tags property: Contains resource tags defined as key/value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Contains resource tags defined as key/value pairs. - * - * @param tags the tags value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the PrivateLinkResource object itself. - */ - public PrivateLinkResource withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the 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 a2e329b0c1ad..000000000000 --- 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 76dbb0e8e76e..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace along with {@link Response}. - */ - Response listWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the private link resources that need to be created for a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the private link resources that need to be created for a workspace. - */ - PrivateLinkResourceListResult list(String resourceGroupName, String workspaceName); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java deleted file mode 100644 index bd4774e9026c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of PrivateLinkServiceConnectionState class. */ - public PrivateLinkServiceConnectionState() { - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.status; - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { - this.status = status; - return this; - } - - /** - * Get the description property: The reason for approval/rejection of the connection. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The reason for approval/rejection of the connection. - * - * @param description the description value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @return the actionsRequired value. - */ - public String actionsRequired() { - return this.actionsRequired; - } - - /** - * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on - * the consumer. - * - * @param actionsRequired the actionsRequired value to set. - * @return the PrivateLinkServiceConnectionState object itself. - */ - public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { - this.actionsRequired = actionsRequired; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 3827d5bdb206..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProbeSettings.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ProbeSettings class. */ - public ProbeSettings() { - } - - /** - * Get the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: The number of failures to allow before returning an unhealthy status. - * - * @param failureThreshold the failureThreshold value to set. - * @return the ProbeSettings object itself. - */ - public ProbeSettings withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * Get the 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 0c3c664d7749..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningState.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * The current deployment state of workspace resource. The provisioningState is to indicate states for resource - * provisioning. - */ -public final class ProvisioningState extends ExpandableStringEnum { - /** Static value Unknown for ProvisioningState. */ - public static final ProvisioningState UNKNOWN = fromString("Unknown"); - - /** Static value Updating for ProvisioningState. */ - public static final ProvisioningState UPDATING = fromString("Updating"); - - /** Static value Creating for ProvisioningState. */ - public static final ProvisioningState CREATING = fromString("Creating"); - - /** Static value Deleting for ProvisioningState. */ - public static final ProvisioningState DELETING = fromString("Deleting"); - - /** Static value Succeeded for ProvisioningState. */ - public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ProvisioningState. */ - public static final ProvisioningState FAILED = fromString("Failed"); - - /** Static value Canceled for ProvisioningState. */ - public static final ProvisioningState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningState() { - } - - /** - * Creates or finds a ProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningState. - */ - @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 55ec63e378b1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ProvisioningStatus.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; - -/** The current deployment state of schedule. */ -public final class ProvisioningStatus extends ExpandableStringEnum { - /** Static value Completed for ProvisioningStatus. */ - public static final ProvisioningStatus COMPLETED = fromString("Completed"); - - /** Static value Provisioning for ProvisioningStatus. */ - public static final ProvisioningStatus PROVISIONING = fromString("Provisioning"); - - /** Static value Failed for ProvisioningStatus. */ - public static final ProvisioningStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of ProvisioningStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ProvisioningStatus() { - } - - /** - * Creates or finds a ProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ProvisioningStatus. - */ - @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 c18df6cfe688..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccess.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; - -/** Whether requests from Public Network are allowed. */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for PublicNetworkAccess. */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - @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 93629faaf07d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PublicNetworkAccessType.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; - -/** Enum to determine whether PublicNetworkAccess is Enabled or Disabled. */ -public final class PublicNetworkAccessType extends ExpandableStringEnum { - /** Static value Enabled for PublicNetworkAccessType. */ - public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); - - /** Static value Disabled for PublicNetworkAccessType. */ - public static final PublicNetworkAccessType DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccessType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccessType() { - } - - /** - * Creates or finds a PublicNetworkAccessType from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccessType. - */ - @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 c172265d0b92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/PyTorch.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.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; - - /** Creates an instance of PyTorch class. */ - public PyTorch() { - } - - /** - * 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 3a3c3836c068..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaBaseProperties.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; - -/** 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; - - /** Creates an instance of QuotaBaseProperties class. */ - public QuotaBaseProperties() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Specifies the resource ID. - * - * @param id the id value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Specifies the resource type. - * - * @param type the type value to set. - * @return the QuotaBaseProperties object itself. - */ - public QuotaBaseProperties withType(String type) { - this.type = type; - return this; - } - - /** - * Get the limit property: 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 af950e89ade0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUnit.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; - -/** An enum describing the unit of quota measurement. */ -public final class QuotaUnit extends ExpandableStringEnum { - /** Static value Count for QuotaUnit. */ - public static final QuotaUnit COUNT = fromString("Count"); - - /** - * Creates a new instance of QuotaUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public QuotaUnit() { - } - - /** - * Creates or finds a QuotaUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding QuotaUnit. - */ - @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 38d413ef636e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/QuotaUpdateParameters.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; - -/** 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; - - /** Creates an instance of QuotaUpdateParameters class. */ - public QuotaUpdateParameters() { - } - - /** - * Get the value property: The list for update quota. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list for update quota. - * - * @param value the value value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the location property: Region of workspace quota to be updated. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region of workspace quota to be updated. - * - * @param location the location value to set. - * @return the QuotaUpdateParameters object itself. - */ - public QuotaUpdateParameters withLocation(String location) { - this.location = location; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 aa2c3e0fc411..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota along with {@link Response}. - */ - Response updateWithResponse( - String location, QuotaUpdateParameters parameters, Context context); - - /** - * Update quota for each VM family in workspace. - * - * @param location The location for update quota is queried. - * @param parameters Quota update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of update workspace quota. - */ - UpdateWorkspaceQuotasResult update(String location, QuotaUpdateParameters parameters); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(String location); - - /** - * Gets the currently assigned Workspace Quotas based on VMFamily. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the currently assigned Workspace Quotas based on VMFamily as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(String location, Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.java deleted file mode 100644 index cdb0b372a244..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithm.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.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; - - /** Creates an instance of RandomSamplingAlgorithm class. */ - public RandomSamplingAlgorithm() { - } - - /** - * 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 c545105fa8ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RandomSamplingAlgorithmRule.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; - -/** The specific type of random algorithm. */ -public final class RandomSamplingAlgorithmRule extends ExpandableStringEnum { - /** Static value Random for RandomSamplingAlgorithmRule. */ - public static final RandomSamplingAlgorithmRule RANDOM = fromString("Random"); - - /** Static value Sobol for RandomSamplingAlgorithmRule. */ - public static final RandomSamplingAlgorithmRule SOBOL = fromString("Sobol"); - - /** - * Creates a new instance of RandomSamplingAlgorithmRule value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RandomSamplingAlgorithmRule() { - } - - /** - * Creates or finds a RandomSamplingAlgorithmRule from its string representation. - * - * @param name a name to look for. - * @return the corresponding RandomSamplingAlgorithmRule. - */ - @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 e1fa4dc2dfb9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceFrequency.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; - -/** Enum to describe the frequency of a recurrence schedule. */ -public final class RecurrenceFrequency extends ExpandableStringEnum { - /** Static value Minute for RecurrenceFrequency. */ - public static final RecurrenceFrequency MINUTE = fromString("Minute"); - - /** Static value Hour for RecurrenceFrequency. */ - public static final RecurrenceFrequency HOUR = fromString("Hour"); - - /** Static value Day for RecurrenceFrequency. */ - public static final RecurrenceFrequency DAY = fromString("Day"); - - /** Static value Week for RecurrenceFrequency. */ - public static final RecurrenceFrequency WEEK = fromString("Week"); - - /** Static value Month for RecurrenceFrequency. */ - public static final RecurrenceFrequency MONTH = fromString("Month"); - - /** - * Creates a new instance of RecurrenceFrequency value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RecurrenceFrequency() { - } - - /** - * Creates or finds a RecurrenceFrequency from its string representation. - * - * @param name a name to look for. - * @return the corresponding RecurrenceFrequency. - */ - @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/RecurrenceSchedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java deleted file mode 100644 index 519561c59993..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceSchedule.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The RecurrenceSchedule model. */ -@Fluent -public final class RecurrenceSchedule { - /* - * [Required] List of hours for the schedule. - */ - @JsonProperty(value = "hours", required = true) - private List hours; - - /* - * [Required] List of minutes for the schedule. - */ - @JsonProperty(value = "minutes", required = true) - private List minutes; - - /* - * List of month days for the schedule - */ - @JsonProperty(value = "monthDays") - private List monthDays; - - /* - * List of days for the schedule. - */ - @JsonProperty(value = "weekDays") - private List weekDays; - - /** Creates an instance of RecurrenceSchedule class. */ - public RecurrenceSchedule() { - } - - /** - * Get the hours property: [Required] List of hours for the schedule. - * - * @return the hours value. - */ - public List hours() { - return this.hours; - } - - /** - * Set the hours property: [Required] List of hours for the schedule. - * - * @param hours the hours value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withHours(List hours) { - this.hours = hours; - return this; - } - - /** - * Get the minutes property: [Required] List of minutes for the schedule. - * - * @return the minutes value. - */ - public List minutes() { - return this.minutes; - } - - /** - * Set the minutes property: [Required] List of minutes for the schedule. - * - * @param minutes the minutes value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMinutes(List minutes) { - this.minutes = minutes; - return this; - } - - /** - * Get the monthDays property: List of month days for the schedule. - * - * @return the monthDays value. - */ - public List monthDays() { - return this.monthDays; - } - - /** - * Set the monthDays property: List of month days for the schedule. - * - * @param monthDays the monthDays value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withMonthDays(List monthDays) { - this.monthDays = monthDays; - return this; - } - - /** - * Get the weekDays property: List of days for the schedule. - * - * @return the weekDays value. - */ - public List weekDays() { - return this.weekDays; - } - - /** - * Set the weekDays property: List of days for the schedule. - * - * @param weekDays the weekDays value to set. - * @return the RecurrenceSchedule object itself. - */ - public RecurrenceSchedule withWeekDays(List weekDays) { - this.weekDays = weekDays; - return this; - } - - /** - * 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 RecurrenceSchedule")); - } - if (minutes() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property minutes in model RecurrenceSchedule")); - } - } - - 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/RecurrenceTrigger.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java deleted file mode 100644 index 8937548c5ba4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RecurrenceTrigger.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The RecurrenceTrigger model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "triggerType") -@JsonTypeName("Recurrence") -@Fluent -public final class RecurrenceTrigger extends TriggerBase { - /* - * [Required] The frequency 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; - - /* - * The recurrence schedule. - */ - @JsonProperty(value = "schedule") - private RecurrenceSchedule schedule; - - /** Creates an instance of RecurrenceTrigger class. */ - public RecurrenceTrigger() { - } - - /** - * Get the frequency property: [Required] The frequency to trigger schedule. - * - * @return the frequency value. - */ - public RecurrenceFrequency frequency() { - return this.frequency; - } - - /** - * Set the frequency property: [Required] The frequency to trigger schedule. - * - * @param frequency the frequency value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withFrequency(RecurrenceFrequency frequency) { - this.frequency = frequency; - return this; - } - - /** - * Get the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @return the interval value. - */ - public int interval() { - return this.interval; - } - - /** - * Set the interval property: [Required] Specifies schedule interval in conjunction with frequency. - * - * @param interval the interval value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withInterval(int interval) { - this.interval = interval; - return this; - } - - /** - * Get the schedule property: The recurrence schedule. - * - * @return the schedule value. - */ - public RecurrenceSchedule schedule() { - return this.schedule; - } - - /** - * Set the schedule property: The recurrence schedule. - * - * @param schedule the schedule value to set. - * @return the RecurrenceTrigger object itself. - */ - public RecurrenceTrigger withSchedule(RecurrenceSchedule schedule) { - this.schedule = schedule; - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceTrigger withEndTime(String endTime) { - super.withEndTime(endTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceTrigger withStartTime(String startTime) { - super.withStartTime(startTime); - return this; - } - - /** {@inheritDoc} */ - @Override - public RecurrenceTrigger withTimeZone(String timeZone) { - super.withTimeZone(timeZone); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (frequency() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property frequency in model RecurrenceTrigger")); - } - if (schedule() != null) { - schedule().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RecurrenceTrigger.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 128be86bca31..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ReferenceType.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; - -/** Enum to determine which reference method to use for an asset. */ -public final class ReferenceType extends ExpandableStringEnum { - /** Static value Id for ReferenceType. */ - public static final ReferenceType ID = fromString("Id"); - - /** Static value DataPath for ReferenceType. */ - public static final ReferenceType DATA_PATH = fromString("DataPath"); - - /** Static value OutputPath for ReferenceType. */ - public static final ReferenceType OUTPUT_PATH = fromString("OutputPath"); - - /** - * Creates a new instance of ReferenceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ReferenceType() { - } - - /** - * Creates or finds a ReferenceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ReferenceType. - */ - @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 637b34d4e5ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegenerateEndpointKeysRequest.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; - -/** 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; - - /** Creates an instance of RegenerateEndpointKeysRequest class. */ - public RegenerateEndpointKeysRequest() { - } - - /** - * Get the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * - * @return the keyType value. - */ - public KeyType keyType() { - return this.keyType; - } - - /** - * Set the keyType property: [Required] Specification for which type of key to generate. Primary or Secondary. - * - * @param keyType the keyType value to set. - * @return the RegenerateEndpointKeysRequest object itself. - */ - public RegenerateEndpointKeysRequest withKeyType(KeyType keyType) { - this.keyType = keyType; - return this; - } - - /** - * Get the keyValue property: The value the key is set to. - * - * @return the keyValue value. - */ - public String keyValue() { - return this.keyValue; - } - - /** - * Set the keyValue property: The value the key is set to. - * - * @param keyValue the keyValue value to set. - * @return the RegenerateEndpointKeysRequest object itself. - */ - public RegenerateEndpointKeysRequest withKeyValue(String keyValue) { - this.keyValue = keyValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (keyType() == null) { - throw LOGGER - .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 ada32c54e2e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegistryListCredentialsResult.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.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; - - /** Creates an instance of RegistryListCredentialsResult class. */ - public RegistryListCredentialsResult() { - } - - /** - * Get the location property: The location property. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Get the passwords property: The passwords property. - * - * @return the passwords value. - */ - public List passwords() { - return this.passwords; - } - - /** - * Set the passwords property: The passwords property. - * - * @param passwords the passwords value to set. - * @return the RegistryListCredentialsResult object itself. - */ - public RegistryListCredentialsResult withPasswords(List passwords) { - this.passwords = passwords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (passwords() != null) { - passwords().forEach(e -> e.validate()); - } - } -} 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 40ed6fd905bf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Regression.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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 { - /* - * Primary metric for regression task. - */ - @JsonProperty(value = "primaryMetric") - private RegressionPrimaryMetrics primaryMetric; - - /* - * Inputs for training phase for an AutoML Job. - */ - @JsonProperty(value = "trainingSettings") - private RegressionTrainingSettings trainingSettings; - - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private MLTableJobInput testData; - - /* - * 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /* - * 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; - - /** Creates an instance of Regression class. */ - public Regression() { - } - - /** - * Get the primaryMetric property: Primary metric for regression task. - * - * @return the primaryMetric value. - */ - public RegressionPrimaryMetrics primaryMetric() { - return this.primaryMetric; - } - - /** - * Set the primaryMetric property: Primary metric for regression task. - * - * @param primaryMetric the primaryMetric value to set. - * @return the Regression object itself. - */ - public Regression withPrimaryMetric(RegressionPrimaryMetrics primaryMetric) { - this.primaryMetric = primaryMetric; - return this; - } - - /** - * Get the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @return the trainingSettings value. - */ - public RegressionTrainingSettings trainingSettings() { - return this.trainingSettings; - } - - /** - * Set the trainingSettings property: Inputs for training phase for an AutoML Job. - * - * @param trainingSettings the trainingSettings value to set. - * @return the Regression object itself. - */ - public Regression withTrainingSettings(RegressionTrainingSettings trainingSettings) { - this.trainingSettings = trainingSettings; - return this; - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the Regression object itself. - */ - public Regression withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the 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 nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the Regression object itself. - */ - public Regression withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the Regression object itself. - */ - public Regression withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the Regression object itself. - */ - public Regression withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the Regression object itself. - */ - public Regression withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the Regression object itself. - */ - public Regression withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the Regression object itself. - */ - public Regression withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** {@inheritDoc} */ - @Override - public Regression withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public Regression withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public Regression withTrainingData(MLTableJobInput 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 (trainingSettings() != null) { - trainingSettings().validate(); - } - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (testData() != null) { - testData().validate(); - } - if (validationData() != null) { - validationData().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 2325aadc2dd9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionModels.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; - -/** Enum for all Regression models supported by AutoML. */ -public final class RegressionModels extends ExpandableStringEnum { - /** Static value ElasticNet for RegressionModels. */ - public static final RegressionModels ELASTIC_NET = fromString("ElasticNet"); - - /** Static value GradientBoosting for RegressionModels. */ - public static final RegressionModels GRADIENT_BOOSTING = fromString("GradientBoosting"); - - /** Static value DecisionTree for RegressionModels. */ - public static final RegressionModels DECISION_TREE = fromString("DecisionTree"); - - /** Static value KNN for RegressionModels. */ - public static final RegressionModels KNN = fromString("KNN"); - - /** Static value LassoLars for RegressionModels. */ - public static final RegressionModels LASSO_LARS = fromString("LassoLars"); - - /** Static value SGD for RegressionModels. */ - public static final RegressionModels SGD = fromString("SGD"); - - /** Static value RandomForest for RegressionModels. */ - public static final RegressionModels RANDOM_FOREST = fromString("RandomForest"); - - /** Static value ExtremeRandomTrees for RegressionModels. */ - public static final RegressionModels EXTREME_RANDOM_TREES = fromString("ExtremeRandomTrees"); - - /** Static value LightGBM for RegressionModels. */ - public static final RegressionModels LIGHT_GBM = fromString("LightGBM"); - - /** Static value XGBoostRegressor for RegressionModels. */ - public static final RegressionModels XGBOOST_REGRESSOR = fromString("XGBoostRegressor"); - - /** - * Creates a new instance of RegressionModels value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RegressionModels() { - } - - /** - * Creates or finds a RegressionModels from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionModels. - */ - @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 36dd7417b9d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionPrimaryMetrics.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Primary metrics for Regression task. */ -public final class RegressionPrimaryMetrics extends ExpandableStringEnum { - /** Static value SpearmanCorrelation for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics SPEARMAN_CORRELATION = fromString("SpearmanCorrelation"); - - /** Static value NormalizedRootMeanSquaredError for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics NORMALIZED_ROOT_MEAN_SQUARED_ERROR = - fromString("NormalizedRootMeanSquaredError"); - - /** Static value R2Score for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics R2SCORE = fromString("R2Score"); - - /** Static value NormalizedMeanAbsoluteError for RegressionPrimaryMetrics. */ - public static final RegressionPrimaryMetrics NORMALIZED_MEAN_ABSOLUTE_ERROR = - fromString("NormalizedMeanAbsoluteError"); - - /** - * Creates a new instance of RegressionPrimaryMetrics value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RegressionPrimaryMetrics() { - } - - /** - * Creates or finds a RegressionPrimaryMetrics from its string representation. - * - * @param name a name to look for. - * @return the corresponding RegressionPrimaryMetrics. - */ - @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/RegressionTrainingSettings.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.java deleted file mode 100644 index 289a03ff5640..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RegressionTrainingSettings.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.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; -import java.util.List; - -/** Regression Training related configuration. */ -@Fluent -public final class RegressionTrainingSettings extends TrainingSettings { - /* - * Allowed models for regression task. - */ - @JsonProperty(value = "allowedTrainingAlgorithms") - private List allowedTrainingAlgorithms; - - /* - * Blocked models for regression task. - */ - @JsonProperty(value = "blockedTrainingAlgorithms") - private List blockedTrainingAlgorithms; - - /** Creates an instance of RegressionTrainingSettings class. */ - public RegressionTrainingSettings() { - } - - /** - * Get the allowedTrainingAlgorithms property: Allowed models for regression task. - * - * @return the allowedTrainingAlgorithms value. - */ - public List allowedTrainingAlgorithms() { - return this.allowedTrainingAlgorithms; - } - - /** - * Set the allowedTrainingAlgorithms property: Allowed models for regression task. - * - * @param allowedTrainingAlgorithms the allowedTrainingAlgorithms value to set. - * @return the RegressionTrainingSettings object itself. - */ - public RegressionTrainingSettings withAllowedTrainingAlgorithms(List allowedTrainingAlgorithms) { - this.allowedTrainingAlgorithms = allowedTrainingAlgorithms; - return this; - } - - /** - * Get the blockedTrainingAlgorithms property: Blocked models for regression task. - * - * @return the blockedTrainingAlgorithms value. - */ - public List blockedTrainingAlgorithms() { - return this.blockedTrainingAlgorithms; - } - - /** - * Set the blockedTrainingAlgorithms property: Blocked models for regression task. - * - * @param blockedTrainingAlgorithms the blockedTrainingAlgorithms value to set. - * @return the RegressionTrainingSettings object itself. - */ - public RegressionTrainingSettings withBlockedTrainingAlgorithms(List blockedTrainingAlgorithms) { - this.blockedTrainingAlgorithms = blockedTrainingAlgorithms; - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnableDnnTraining(Boolean enableDnnTraining) { - super.withEnableDnnTraining(enableDnnTraining); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnableModelExplainability(Boolean enableModelExplainability) { - super.withEnableModelExplainability(enableModelExplainability); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnableOnnxCompatibleModels(Boolean enableOnnxCompatibleModels) { - super.withEnableOnnxCompatibleModels(enableOnnxCompatibleModels); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnableStackEnsemble(Boolean enableStackEnsemble) { - super.withEnableStackEnsemble(enableStackEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnableVoteEnsemble(Boolean enableVoteEnsemble) { - super.withEnableVoteEnsemble(enableVoteEnsemble); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withEnsembleModelDownloadTimeout(Duration ensembleModelDownloadTimeout) { - super.withEnsembleModelDownloadTimeout(ensembleModelDownloadTimeout); - return this; - } - - /** {@inheritDoc} */ - @Override - public RegressionTrainingSettings withStackEnsembleSettings(StackEnsembleSettings stackEnsembleSettings) { - super.withStackEnsembleSettings(stackEnsembleSettings); - 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/RemoteLoginPortPublicAccess.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java deleted file mode 100644 index 2c097b672cde..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/RemoteLoginPortPublicAccess.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Close remote Login Access Port - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all - * nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - * - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all - * public nodes. It can be default only during cluster creation time, after creation it will be either enabled or - * disabled. - */ -public final class RemoteLoginPortPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess DISABLED = fromString("Disabled"); - - /** Static value NotSpecified for RemoteLoginPortPublicAccess. */ - public static final RemoteLoginPortPublicAccess NOT_SPECIFIED = fromString("NotSpecified"); - - /** - * Creates a new instance of RemoteLoginPortPublicAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RemoteLoginPortPublicAccess() { - } - - /** - * Creates or finds a RemoteLoginPortPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding RemoteLoginPortPublicAccess. - */ - @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 4d9b1502f311..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceBase.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of ResourceBase class. */ - public ResourceBase() { - } - - /** - * Get the description property: The asset description text. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The asset description text. - * - * @param description the description value to set. - * @return the ResourceBase object itself. - */ - public ResourceBase withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the 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 01067c5f7380..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceConfiguration.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.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** The ResourceConfiguration model. */ -@Fluent -public 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; - - /** Creates an instance of ResourceConfiguration class. */ - public ResourceConfiguration() { - } - - /** - * Get the instanceCount property: Optional number of instances or nodes used by the compute target. - * - * @return the instanceCount value. - */ - public Integer instanceCount() { - return this.instanceCount; - } - - /** - * Set the instanceCount property: Optional number of instances or nodes used by the compute target. - * - * @param instanceCount the instanceCount value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withInstanceCount(Integer instanceCount) { - this.instanceCount = instanceCount; - return this; - } - - /** - * Get the instanceType property: Optional type of VM used as supported by the compute target. - * - * @return the instanceType value. - */ - public String instanceType() { - return this.instanceType; - } - - /** - * Set the instanceType property: Optional type of VM used as supported by the compute target. - * - * @param instanceType the instanceType value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withInstanceType(String instanceType) { - this.instanceType = instanceType; - return this; - } - - /** - * Get the properties property: Additional properties bag. - * - * @return the properties value. - */ - public Map properties() { - return this.properties; - } - - /** - * Set the properties property: Additional properties bag. - * - * @param properties the properties value to set. - * @return the ResourceConfiguration object itself. - */ - public ResourceConfiguration withProperties(Map properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 a5cc276054e2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceId.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.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; - - /** Creates an instance of ResourceId class. */ - public ResourceId() { - } - - /** - * Get the id property: The ID of the resource. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: The ID of the resource. - * - * @param id the id value to set. - * @return the ResourceId object itself. - */ - public ResourceId withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER - .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 9824d46b6678..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceName.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; - -/** 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; - - /** Creates an instance of ResourceName class. */ - public ResourceName() { - } - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 107b099bcf5a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ResourceQuota.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; - -/** An immutable client-side representation of ResourceQuota. */ -public interface ResourceQuota { - /** - * Gets the id property: Specifies the resource ID. - * - * @return the id value. - */ - String id(); - - /** - * Gets the amlWorkspaceLocation property: Region of the AML workspace in the id. - * - * @return the amlWorkspaceLocation value. - */ - String amlWorkspaceLocation(); - - /** - * Gets the type property: Specifies the resource type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the name property: Name of the resource. - * - * @return the name value. - */ - ResourceName name(); - - /** - * Gets the limit property: 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 ce8860e8900b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Route.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of Route class. */ - public Route() { - } - - /** - * Get the path property: [Required] The path for the route. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: [Required] The path for the route. - * - * @param path the path value to set. - * @return the Route object itself. - */ - public Route withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the port property: [Required] The port for the route. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: [Required] The port for the route. - * - * @param port the port value to set. - * @return the Route object itself. - */ - public Route withPort(int port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (path() == null) { - throw LOGGER - .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 1a96ee37626e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithm.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; - -/** 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 { - /** Creates an instance of SamplingAlgorithm class. */ - public 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 60cde05582b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SamplingAlgorithmType.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 SamplingAlgorithmType. */ -public final class SamplingAlgorithmType extends ExpandableStringEnum { - /** Static value Grid for SamplingAlgorithmType. */ - public static final SamplingAlgorithmType GRID = fromString("Grid"); - - /** Static value Random for SamplingAlgorithmType. */ - public static final SamplingAlgorithmType RANDOM = fromString("Random"); - - /** Static value Bayesian for SamplingAlgorithmType. */ - public static final SamplingAlgorithmType BAYESIAN = fromString("Bayesian"); - - /** - * Creates a new instance of SamplingAlgorithmType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SamplingAlgorithmType() { - } - - /** - * Creates or finds a SamplingAlgorithmType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SamplingAlgorithmType. - */ - @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/SasAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index 1065fa7947c6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 SasAuthTypeWorkspaceConnectionProperties model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("SAS") -@Fluent -public final class SasAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * The credentials property. - */ - @JsonProperty(value = "credentials") - private WorkspaceConnectionSharedAccessSignature credentials; - - /** Creates an instance of SasAuthTypeWorkspaceConnectionProperties class. */ - public SasAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionSharedAccessSignature credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the SasAuthTypeWorkspaceConnectionProperties object itself. - */ - public SasAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionSharedAccessSignature credentials) { - this.credentials = credentials; - return this; - } - - /** {@inheritDoc} */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** {@inheritDoc} */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** {@inheritDoc} */ - @Override - public SasAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } -} 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 81edf1559396..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreCredentials.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.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; - - /** Creates an instance of SasDatastoreCredentials class. */ - public SasDatastoreCredentials() { - } - - /** - * 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 dbeda80d6e30..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SasDatastoreSecrets.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.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; - - /** Creates an instance of SasDatastoreSecrets class. */ - public SasDatastoreSecrets() { - } - - /** - * 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 efd70e8605e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettings.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.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; - - /** Creates an instance of ScaleSettings class. */ - public ScaleSettings() { - } - - /** - * Get the maxNodeCount property: Max number of nodes to use. - * - * @return the maxNodeCount value. - */ - public int maxNodeCount() { - return this.maxNodeCount; - } - - /** - * Set the maxNodeCount property: Max number of nodes to use. - * - * @param maxNodeCount the maxNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMaxNodeCount(int maxNodeCount) { - this.maxNodeCount = maxNodeCount; - return this; - } - - /** - * Get the minNodeCount property: Min number of nodes to use. - * - * @return the minNodeCount value. - */ - public Integer minNodeCount() { - return this.minNodeCount; - } - - /** - * Set the minNodeCount property: Min number of nodes to use. - * - * @param minNodeCount the minNodeCount value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withMinNodeCount(Integer minNodeCount) { - this.minNodeCount = minNodeCount; - return this; - } - - /** - * Get the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @return the nodeIdleTimeBeforeScaleDown value. - */ - public Duration nodeIdleTimeBeforeScaleDown() { - return this.nodeIdleTimeBeforeScaleDown; - } - - /** - * Set the nodeIdleTimeBeforeScaleDown property: Node Idle Time before scaling down amlCompute. This string needs to - * be in the RFC Format. - * - * @param nodeIdleTimeBeforeScaleDown the nodeIdleTimeBeforeScaleDown value to set. - * @return the ScaleSettings object itself. - */ - public ScaleSettings withNodeIdleTimeBeforeScaleDown(Duration nodeIdleTimeBeforeScaleDown) { - this.nodeIdleTimeBeforeScaleDown = nodeIdleTimeBeforeScaleDown; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 f5282e103e15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleSettingsInformation.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.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; - - /** Creates an instance of ScaleSettingsInformation class. */ - public ScaleSettingsInformation() { - } - - /** - * Get the scaleSettings property: scale settings for AML Compute. - * - * @return the scaleSettings value. - */ - public ScaleSettings scaleSettings() { - return this.scaleSettings; - } - - /** - * Set the scaleSettings property: scale settings for AML Compute. - * - * @param scaleSettings the scaleSettings value to set. - * @return the ScaleSettingsInformation object itself. - */ - public ScaleSettingsInformation withScaleSettings(ScaleSettings scaleSettings) { - this.scaleSettings = scaleSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scaleSettings() != null) { - scaleSettings().validate(); - } - } -} 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 418165898f39..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScaleType.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 ScaleType. */ -public final class ScaleType extends ExpandableStringEnum { - /** Static value Default for ScaleType. */ - public static final ScaleType DEFAULT = fromString("Default"); - - /** Static value TargetUtilization for ScaleType. */ - public static final ScaleType TARGET_UTILIZATION = fromString("TargetUtilization"); - - /** - * Creates a new instance of ScaleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScaleType() { - } - - /** - * Creates or finds a ScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScaleType. - */ - @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/Schedule.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.java deleted file mode 100644 index 7808d864dab9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedule.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.ScheduleInner; - -/** An immutable client-side representation of Schedule. */ -public interface Schedule { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: [Required] Additional attributes of the entity. - * - * @return the properties value. - */ - ScheduleProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner object. - * - * @return the inner object. - */ - ScheduleInner innerModel(); - - /** The entirety of the Schedule definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The Schedule definition stages. */ - interface DefinitionStages { - /** The first stage of the Schedule definition. */ - interface Blank extends WithParentResource { - } - /** The stage of the Schedule definition allowing to specify parent resource. */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the Schedule definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - WithCreate withProperties(ScheduleProperties properties); - } - /** - * The stage of the Schedule definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - Schedule create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Schedule create(Context context); - } - } - /** - * Begins update for the Schedule resource. - * - * @return the stage of resource update. - */ - Schedule.Update update(); - - /** The template for Schedule update. */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Schedule apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Schedule apply(Context context); - } - /** The Schedule update stages. */ - interface UpdateStages { - /** The stage of the Schedule update allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: [Required] Additional attributes of the entity.. - * - * @param properties [Required] Additional attributes of the entity. - * @return the next definition stage. - */ - Update withProperties(ScheduleProperties properties); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Schedule refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Schedule refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.java deleted file mode 100644 index d88932a1d1c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionBase.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.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The ScheduleActionBase model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "actionType", - defaultImpl = ScheduleActionBase.class) -@JsonTypeName("ScheduleActionBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "InvokeBatchEndpoint", value = EndpointScheduleAction.class), - @JsonSubTypes.Type(name = "CreateJob", value = JobScheduleAction.class) -}) -@Immutable -public class ScheduleActionBase { - /** Creates an instance of ScheduleActionBase class. */ - public ScheduleActionBase() { - } - - /** - * 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/ScheduleActionType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.java deleted file mode 100644 index 24fe002c8704..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleActionType.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 ScheduleActionType. */ -public final class ScheduleActionType extends ExpandableStringEnum { - /** Static value CreateJob for ScheduleActionType. */ - public static final ScheduleActionType CREATE_JOB = fromString("CreateJob"); - - /** Static value InvokeBatchEndpoint for ScheduleActionType. */ - public static final ScheduleActionType INVOKE_BATCH_ENDPOINT = fromString("InvokeBatchEndpoint"); - - /** - * Creates a new instance of ScheduleActionType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleActionType() { - } - - /** - * Creates or finds a ScheduleActionType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleActionType. - */ - @JsonCreator - public static ScheduleActionType fromString(String name) { - return fromString(name, ScheduleActionType.class); - } - - /** - * Gets known ScheduleActionType values. - * - * @return known ScheduleActionType values. - */ - public static Collection values() { - return values(ScheduleActionType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.java deleted file mode 100644 index dfff85753766..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleBase.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; - -/** The ScheduleBase model. */ -@Fluent -public final class ScheduleBase { - /* - * A system assigned id for the schedule. - */ - @JsonProperty(value = "id") - private String id; - - /* - * The current deployment state of schedule. - */ - @JsonProperty(value = "provisioningStatus") - private ScheduleProvisioningState provisioningStatus; - - /* - * Is the schedule enabled or disabled? - */ - @JsonProperty(value = "status") - private ScheduleStatus status; - - /** Creates an instance of ScheduleBase class. */ - public ScheduleBase() { - } - - /** - * Get the id property: A system assigned id for the schedule. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: A system assigned id for the schedule. - * - * @param id the id value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withId(String id) { - this.id = id; - return this; - } - - /** - * Get the provisioningStatus property: The current deployment state of schedule. - * - * @return the provisioningStatus value. - */ - public ScheduleProvisioningState provisioningStatus() { - return this.provisioningStatus; - } - - /** - * Set the provisioningStatus property: The current deployment state of schedule. - * - * @param provisioningStatus the provisioningStatus value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withProvisioningStatus(ScheduleProvisioningState provisioningStatus) { - this.provisioningStatus = provisioningStatus; - return this; - } - - /** - * Get the status property: Is the schedule enabled or disabled?. - * - * @return the status value. - */ - public ScheduleStatus status() { - return this.status; - } - - /** - * Set the status property: Is the schedule enabled or disabled?. - * - * @param status the status value to set. - * @return the ScheduleBase object itself. - */ - public ScheduleBase withStatus(ScheduleStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.java deleted file mode 100644 index a10f3e1b3653..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleListViewType.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 ScheduleListViewType. */ -public final class ScheduleListViewType extends ExpandableStringEnum { - /** Static value EnabledOnly for ScheduleListViewType. */ - public static final ScheduleListViewType ENABLED_ONLY = fromString("EnabledOnly"); - - /** Static value DisabledOnly for ScheduleListViewType. */ - public static final ScheduleListViewType DISABLED_ONLY = fromString("DisabledOnly"); - - /** Static value All for ScheduleListViewType. */ - public static final ScheduleListViewType ALL = fromString("All"); - - /** - * Creates a new instance of ScheduleListViewType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleListViewType() { - } - - /** - * Creates or finds a ScheduleListViewType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleListViewType. - */ - @JsonCreator - public static ScheduleListViewType fromString(String name) { - return fromString(name, ScheduleListViewType.class); - } - - /** - * Gets known ScheduleListViewType values. - * - * @return known ScheduleListViewType values. - */ - public static Collection values() { - return values(ScheduleListViewType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java deleted file mode 100644 index 2e486abeab37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProperties.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.Map; - -/** Base definition of a schedule. */ -@Fluent -public final class ScheduleProperties extends ResourceBase { - /* - * [Required] Specifies the action of the schedule - */ - @JsonProperty(value = "action", required = true) - private ScheduleActionBase action; - - /* - * Display name of schedule. - */ - @JsonProperty(value = "displayName") - private String displayName; - - /* - * Is the schedule enabled? - */ - @JsonProperty(value = "isEnabled") - private Boolean isEnabled; - - /* - * Provisioning state for the schedule. - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private ScheduleProvisioningStatus provisioningState; - - /* - * [Required] Specifies the trigger details - */ - @JsonProperty(value = "trigger", required = true) - private TriggerBase trigger; - - /** Creates an instance of ScheduleProperties class. */ - public ScheduleProperties() { - } - - /** - * Get the action property: [Required] Specifies the action of the schedule. - * - * @return the action value. - */ - public ScheduleActionBase action() { - return this.action; - } - - /** - * Set the action property: [Required] Specifies the action of the schedule. - * - * @param action the action value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withAction(ScheduleActionBase action) { - this.action = action; - return this; - } - - /** - * Get the displayName property: Display name of schedule. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: Display name of schedule. - * - * @param displayName the displayName value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Get the isEnabled property: Is the schedule enabled?. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Is the schedule enabled?. - * - * @param isEnabled the isEnabled value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the provisioningState property: Provisioning state for the schedule. - * - * @return the provisioningState value. - */ - public ScheduleProvisioningStatus provisioningState() { - return this.provisioningState; - } - - /** - * Get the trigger property: [Required] Specifies the trigger details. - * - * @return the trigger value. - */ - public TriggerBase trigger() { - return this.trigger; - } - - /** - * Set the trigger property: [Required] Specifies the trigger details. - * - * @param trigger the trigger value to set. - * @return the ScheduleProperties object itself. - */ - public ScheduleProperties withTrigger(TriggerBase trigger) { - this.trigger = trigger; - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduleProperties withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduleProperties withProperties(Map properties) { - super.withProperties(properties); - return this; - } - - /** {@inheritDoc} */ - @Override - public ScheduleProperties 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 (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property action in model ScheduleProperties")); - } else { - action().validate(); - } - if (trigger() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property trigger in model ScheduleProperties")); - } else { - trigger().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScheduleProperties.class); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.java deleted file mode 100644 index ad887ff8aa51..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningState.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; - -/** The current deployment state of schedule. */ -public final class ScheduleProvisioningState extends ExpandableStringEnum { - /** Static value Completed for ScheduleProvisioningState. */ - public static final ScheduleProvisioningState COMPLETED = fromString("Completed"); - - /** Static value Provisioning for ScheduleProvisioningState. */ - public static final ScheduleProvisioningState PROVISIONING = fromString("Provisioning"); - - /** Static value Failed for ScheduleProvisioningState. */ - public static final ScheduleProvisioningState FAILED = fromString("Failed"); - - /** - * Creates a new instance of ScheduleProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleProvisioningState() { - } - - /** - * Creates or finds a ScheduleProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleProvisioningState. - */ - @JsonCreator - public static ScheduleProvisioningState fromString(String name) { - return fromString(name, ScheduleProvisioningState.class); - } - - /** - * Gets known ScheduleProvisioningState values. - * - * @return known ScheduleProvisioningState values. - */ - public static Collection values() { - return values(ScheduleProvisioningState.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.java deleted file mode 100644 index 5f007b3ec15c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleProvisioningStatus.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.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for ScheduleProvisioningStatus. */ -public final class ScheduleProvisioningStatus extends ExpandableStringEnum { - /** Static value Creating for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus CREATING = fromString("Creating"); - - /** Static value Updating for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus UPDATING = fromString("Updating"); - - /** Static value Deleting for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus DELETING = fromString("Deleting"); - - /** Static value Succeeded for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus SUCCEEDED = fromString("Succeeded"); - - /** Static value Failed for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus FAILED = fromString("Failed"); - - /** Static value Canceled for ScheduleProvisioningStatus. */ - public static final ScheduleProvisioningStatus CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of ScheduleProvisioningStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleProvisioningStatus() { - } - - /** - * Creates or finds a ScheduleProvisioningStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleProvisioningStatus. - */ - @JsonCreator - public static ScheduleProvisioningStatus fromString(String name) { - return fromString(name, ScheduleProvisioningStatus.class); - } - - /** - * Gets known ScheduleProvisioningStatus values. - * - * @return known ScheduleProvisioningStatus values. - */ - public static Collection values() { - return values(ScheduleProvisioningStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java deleted file mode 100644 index b43e188d1ab2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleResourceArmPaginatedResult.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** A paginated list of Schedule entities. */ -@Fluent -public final class ScheduleResourceArmPaginatedResult { - /* - * The link to the next page of Schedule objects. If null, there are no additional pages. - */ - @JsonProperty(value = "nextLink") - private String nextLink; - - /* - * An array of objects of type Schedule. - */ - @JsonProperty(value = "value") - private List value; - - /** Creates an instance of ScheduleResourceArmPaginatedResult class. */ - public ScheduleResourceArmPaginatedResult() { - } - - /** - * Get the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of Schedule objects. If null, there are no additional pages. - * - * @param nextLink the nextLink value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: An array of objects of type Schedule. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: An array of objects of type Schedule. - * - * @param value the value value to set. - * @return the ScheduleResourceArmPaginatedResult object itself. - */ - public ScheduleResourceArmPaginatedResult withValue(List value) { - this.value = value; - return this; - } - - /** - * 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/ScheduleStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.java deleted file mode 100644 index a7abf8e3211c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScheduleStatus.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; - -/** Is the schedule enabled or disabled?. */ -public final class ScheduleStatus extends ExpandableStringEnum { - /** Static value Enabled for ScheduleStatus. */ - public static final ScheduleStatus ENABLED = fromString("Enabled"); - - /** Static value Disabled for ScheduleStatus. */ - public static final ScheduleStatus DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of ScheduleStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ScheduleStatus() { - } - - /** - * Creates or finds a ScheduleStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding ScheduleStatus. - */ - @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/Schedules.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.java deleted file mode 100644 index 19f7f8683828..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Schedules.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 Schedules. */ -public interface Schedules { - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * List schedules in specified workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param skip Continuation token for pagination. - * @param listViewType Status filter for schedule. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a paginated list of Schedule entities as paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, - String workspaceName, - String skip, - ScheduleListViewType listViewType, - Context context); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name); - - /** - * Delete schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String workspaceName, String name, Context context); - - /** - * Get schedule. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param name Schedule name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule. - */ - Schedule get(String resourceGroupName, String workspaceName, String name); - - /** - * Get schedule. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. - */ - Schedule getById(String id); - - /** - * Get schedule. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return schedule along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete schedule. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Delete schedule. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Schedule resource. - * - * @param name resource name. - * @return the first stage of the new Schedule definition. - */ - Schedule.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java deleted file mode 100644 index 8c7ad3d4aa8a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptReference.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Script reference. */ -@Fluent -public final class ScriptReference { - /* - * The storage source of the script: 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; - - /** Creates an instance of ScriptReference class. */ - public ScriptReference() { - } - - /** - * Get the scriptSource property: The storage source of the script: workspace. - * - * @return the scriptSource value. - */ - public String scriptSource() { - return this.scriptSource; - } - - /** - * Set the scriptSource property: The storage source of the script: workspace. - * - * @param scriptSource the scriptSource value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptSource(String scriptSource) { - this.scriptSource = scriptSource; - return this; - } - - /** - * Get the scriptData property: The location of scripts in the mounted volume. - * - * @return the scriptData value. - */ - public String scriptData() { - return this.scriptData; - } - - /** - * Set the scriptData property: The location of scripts in the mounted volume. - * - * @param scriptData the scriptData value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptData(String scriptData) { - this.scriptData = scriptData; - return this; - } - - /** - * Get the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @return the scriptArguments value. - */ - public String scriptArguments() { - return this.scriptArguments; - } - - /** - * Set the scriptArguments property: Optional command line arguments passed to the script to run. - * - * @param scriptArguments the scriptArguments value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withScriptArguments(String scriptArguments) { - this.scriptArguments = scriptArguments; - return this; - } - - /** - * Get the timeout property: Optional time period passed to timeout command. - * - * @return the timeout value. - */ - public String timeout() { - return this.timeout; - } - - /** - * Set the timeout property: Optional time period passed to timeout command. - * - * @param timeout the timeout value to set. - * @return the ScriptReference object itself. - */ - public ScriptReference withTimeout(String timeout) { - this.timeout = timeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 5dfd1557e247..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ScriptsToExecute.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.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; - - /** Creates an instance of ScriptsToExecute class. */ - public ScriptsToExecute() { - } - - /** - * Get the startupScript property: Script that's run every time the machine starts. - * - * @return the startupScript value. - */ - public ScriptReference startupScript() { - return this.startupScript; - } - - /** - * Set the startupScript property: Script that's run every time the machine starts. - * - * @param startupScript the startupScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withStartupScript(ScriptReference startupScript) { - this.startupScript = startupScript; - return this; - } - - /** - * Get the creationScript property: Script that's run only once during provision of the compute. - * - * @return the creationScript value. - */ - public ScriptReference creationScript() { - return this.creationScript; - } - - /** - * Set the creationScript property: Script that's run only once during provision of the compute. - * - * @param creationScript the creationScript value to set. - * @return the ScriptsToExecute object itself. - */ - public ScriptsToExecute withCreationScript(ScriptReference creationScript) { - this.creationScript = creationScript; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (startupScript() != null) { - startupScript().validate(); - } - if (creationScript() != null) { - creationScript().validate(); - } - } -} 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 ecb9dc616a66..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Seasonality.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.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 { - /** Creates an instance of Seasonality class. */ - public 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 b75dc02a4616..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SeasonalityMode.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; - -/** Forecasting seasonality mode. */ -public final class SeasonalityMode extends ExpandableStringEnum { - /** Static value Auto for SeasonalityMode. */ - public static final SeasonalityMode AUTO = fromString("Auto"); - - /** Static value Custom for SeasonalityMode. */ - public static final SeasonalityMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of SeasonalityMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SeasonalityMode() { - } - - /** - * Creates or finds a SeasonalityMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding SeasonalityMode. - */ - @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 39bf275d3652..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SecretsType.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; - -/** Enum to determine the datastore secrets type. */ -public final class SecretsType extends ExpandableStringEnum { - /** Static value AccountKey for SecretsType. */ - public static final SecretsType ACCOUNT_KEY = fromString("AccountKey"); - - /** Static value Certificate for SecretsType. */ - public static final SecretsType CERTIFICATE = fromString("Certificate"); - - /** Static value Sas for SecretsType. */ - public static final SecretsType SAS = fromString("Sas"); - - /** Static value ServicePrincipal for SecretsType. */ - public static final SecretsType SERVICE_PRINCIPAL = fromString("ServicePrincipal"); - - /** - * Creates a new instance of SecretsType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecretsType() { - } - - /** - * Creates or finds a SecretsType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecretsType. - */ - @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 b8a1ef1975a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceDataAccessAuthIdentity.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.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 a new instance of ServiceDataAccessAuthIdentity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ServiceDataAccessAuthIdentity() { - } - - /** - * Creates or finds a ServiceDataAccessAuthIdentity from its string representation. - * - * @param name a name to look for. - * @return the corresponding ServiceDataAccessAuthIdentity. - */ - @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 aceabf00a371..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServiceManagedResourcesSettings.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.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; - - /** Creates an instance of ServiceManagedResourcesSettings class. */ - public ServiceManagedResourcesSettings() { - } - - /** - * Get the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @return the cosmosDb value. - */ - public CosmosDbSettings cosmosDb() { - return this.cosmosDb; - } - - /** - * Set the cosmosDb property: The settings for the service managed cosmosdb account. - * - * @param cosmosDb the cosmosDb value to set. - * @return the ServiceManagedResourcesSettings object itself. - */ - public ServiceManagedResourcesSettings withCosmosDb(CosmosDbSettings cosmosDb) { - this.cosmosDb = cosmosDb; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cosmosDb() != null) { - cosmosDb().validate(); - } - } -} 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 f8898ec7e744..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreCredentials.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.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; - - /** Creates an instance of ServicePrincipalDatastoreCredentials class. */ - public ServicePrincipalDatastoreCredentials() { - } - - /** - * 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 8b4dcd3f879a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ServicePrincipalDatastoreSecrets.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.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; - - /** Creates an instance of ServicePrincipalDatastoreSecrets class. */ - public ServicePrincipalDatastoreSecrets() { - } - - /** - * 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 761f98594eea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SetupScripts.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.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; - - /** Creates an instance of SetupScripts class. */ - public SetupScripts() { - } - - /** - * Get the scripts property: Customized setup scripts. - * - * @return the scripts value. - */ - public ScriptsToExecute scripts() { - return this.scripts; - } - - /** - * Set the scripts property: Customized setup scripts. - * - * @param scripts the scripts value to set. - * @return the SetupScripts object itself. - */ - public SetupScripts withScripts(ScriptsToExecute scripts) { - this.scripts = scripts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scripts() != null) { - scripts().validate(); - } - } -} 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 46ec2f251384..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SharedPrivateLinkResource.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.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; - - /** Creates an instance of SharedPrivateLinkResource class. */ - public SharedPrivateLinkResource() { - } - - /** - * Get the name property: Unique name of the private link. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Unique name of the private link. - * - * @param name the name value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withName(String name) { - this.name = name; - return this; - } - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SharedPrivateLinkResourceProperty innerProperties() { - return this.innerProperties; - } - - /** - * Get the privateLinkResourceId property: The resource id that private link links to. - * - * @return the privateLinkResourceId value. - */ - public String privateLinkResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkResourceId(); - } - - /** - * Set the privateLinkResourceId property: The resource id that private link links to. - * - * @param privateLinkResourceId the privateLinkResourceId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withPrivateLinkResourceId(String privateLinkResourceId) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withPrivateLinkResourceId(privateLinkResourceId); - return this; - } - - /** - * Get the groupId property: The private link resource group id. - * - * @return the groupId value. - */ - public String groupId() { - return this.innerProperties() == null ? null : this.innerProperties().groupId(); - } - - /** - * Set the groupId property: The private link resource group id. - * - * @param groupId the groupId value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withGroupId(String groupId) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withGroupId(groupId); - return this; - } - - /** - * Get the requestMessage property: Request message. - * - * @return the requestMessage value. - */ - public String requestMessage() { - return this.innerProperties() == null ? null : this.innerProperties().requestMessage(); - } - - /** - * Set the requestMessage property: Request message. - * - * @param requestMessage the requestMessage value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withRequestMessage(String requestMessage) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withRequestMessage(requestMessage); - return this; - } - - /** - * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @return the status value. - */ - public PrivateEndpointServiceConnectionStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the - * service. - * - * @param status the status value to set. - * @return the SharedPrivateLinkResource object itself. - */ - public SharedPrivateLinkResource withStatus(PrivateEndpointServiceConnectionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new SharedPrivateLinkResourceProperty(); - } - this.innerProperties().withStatus(status); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } -} 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 2ff1fd6f8e2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ShortSeriesHandlingConfiguration.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; - -/** The parameter defining how if AutoML should handle short time series. */ -public final class ShortSeriesHandlingConfiguration extends ExpandableStringEnum { - /** Static value None for ShortSeriesHandlingConfiguration. */ - public static final ShortSeriesHandlingConfiguration NONE = fromString("None"); - - /** Static value Auto for ShortSeriesHandlingConfiguration. */ - public static final ShortSeriesHandlingConfiguration AUTO = fromString("Auto"); - - /** Static value Pad for ShortSeriesHandlingConfiguration. */ - public static final ShortSeriesHandlingConfiguration PAD = fromString("Pad"); - - /** Static value Drop for ShortSeriesHandlingConfiguration. */ - public static final ShortSeriesHandlingConfiguration DROP = fromString("Drop"); - - /** - * Creates a new instance of ShortSeriesHandlingConfiguration value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ShortSeriesHandlingConfiguration() { - } - - /** - * Creates or finds a ShortSeriesHandlingConfiguration from its string representation. - * - * @param name a name to look for. - * @return the corresponding ShortSeriesHandlingConfiguration. - */ - @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 81a4a2701f80..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Sku.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.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; - - /** Creates an instance of Sku class. */ - public Sku() { - } - - /** - * Get the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the Sku object itself. - */ - public Sku withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the Sku object itself. - */ - public Sku withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Get the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @return the size value. - */ - public String size() { - return this.size; - } - - /** - * Set the size property: The SKU size. When the name field is the combination of tier and some other value, this - * would be the standalone code. - * - * @param size the size value to set. - * @return the Sku object itself. - */ - public Sku withSize(String size) { - this.size = size; - return this; - } - - /** - * Get the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @return the family value. - */ - public String family() { - return this.family; - } - - /** - * Set the family property: If the service has different generations of hardware, for the same SKU, then that can be - * captured here. - * - * @param family the family value to set. - * @return the Sku object itself. - */ - public Sku withFamily(String family) { - this.family = family; - return this; - } - - /** - * Get the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @return the capacity value. - */ - public Integer capacity() { - return this.capacity; - } - - /** - * Set the capacity property: If the SKU supports scale out/in then the capacity integer should be included. If - * scale out/in is not possible for the resource this may be omitted. - * - * @param capacity the capacity value to set. - * @return the Sku object itself. - */ - public Sku withCapacity(Integer capacity) { - this.capacity = capacity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .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 4948ce477871..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuCapacity.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of SkuCapacity class. */ - public SkuCapacity() { - } - - /** - * 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 40eb8b46ed0d..000000000000 --- 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 33f198f1dfb7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuResourceArmPaginatedResult.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of SkuResourceArmPaginatedResult class. */ - public SkuResourceArmPaginatedResult() { - } - - /** - * 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 65e5e32d1e55..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuScaleType.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; - -/** Node scaling setting for the compute sku. */ -public final class SkuScaleType extends ExpandableStringEnum { - /** Static value Automatic for SkuScaleType. */ - public static final SkuScaleType AUTOMATIC = fromString("Automatic"); - - /** Static value Manual for SkuScaleType. */ - public static final SkuScaleType MANUAL = fromString("Manual"); - - /** Static value None for SkuScaleType. */ - public static final SkuScaleType NONE = fromString("None"); - - /** - * Creates a new instance of SkuScaleType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SkuScaleType() { - } - - /** - * Creates or finds a SkuScaleType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SkuScaleType. - */ - @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 ab0554e10763..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuSetting.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of SkuSetting class. */ - public SkuSetting() { - } - - /** - * Get the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: [Required] The name of the SKU. Ex - P3. It is typically a letter+number code. - * - * @param name the name value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withName(String name) { - this.name = name; - return this; - } - - /** - * Get the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @return the tier value. - */ - public SkuTier tier() { - return this.tier; - } - - /** - * Set the tier property: This field is required to be implemented by the Resource Provider if the service has more - * than one tier, but is not required on a PUT. - * - * @param tier the tier value to set. - * @return the SkuSetting object itself. - */ - public SkuSetting withTier(SkuTier tier) { - this.tier = tier; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER - .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 60ccbff0c23f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SkuTier.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.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not - * required on a PUT. - */ -public enum SkuTier { - /** Enum value Free. */ - FREE("Free"), - - /** Enum value Basic. */ - BASIC("Basic"), - - /** Enum value Standard. */ - STANDARD("Standard"), - - /** Enum value Premium. */ - PREMIUM("Premium"); - - /** The actual serialized value for a SkuTier instance. */ - private final String value; - - SkuTier(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a SkuTier instance. - * - * @param value the serialized value to parse. - * @return the parsed SkuTier object, or null if unable to parse. - */ - @JsonCreator - public static SkuTier fromString(String value) { - if (value == null) { - return null; - } - SkuTier[] items = SkuTier.values(); - for (SkuTier item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** {@inheritDoc} */ - @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 8499987e169b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SourceType.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; - -/** Data source type. */ -public final class SourceType extends ExpandableStringEnum { - /** Static value Dataset for SourceType. */ - public static final SourceType DATASET = fromString("Dataset"); - - /** Static value Datastore for SourceType. */ - public static final SourceType DATASTORE = fromString("Datastore"); - - /** Static value URI for SourceType. */ - public static final SourceType URI = fromString("URI"); - - /** - * Creates a new instance of SourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SourceType() { - } - - /** - * Creates or finds a SourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceType. - */ - @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 eaad83db9998..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SshPublicAccess.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; - -/** - * Access policy for SSH - * - *

State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this - * instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if - * applicable. - */ -public final class SshPublicAccess extends ExpandableStringEnum { - /** Static value Enabled for SshPublicAccess. */ - public static final SshPublicAccess ENABLED = fromString("Enabled"); - - /** Static value Disabled for SshPublicAccess. */ - public static final SshPublicAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of SshPublicAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SshPublicAccess() { - } - - /** - * Creates or finds a SshPublicAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding SshPublicAccess. - */ - @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/SslConfigStatus.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.java deleted file mode 100644 index 8adaca76bc15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfigStatus.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; - -/** Enable or disable ssl for scoring. */ -public final class SslConfigStatus extends ExpandableStringEnum { - /** Static value Disabled for SslConfigStatus. */ - public static final SslConfigStatus DISABLED = fromString("Disabled"); - - /** Static value Enabled for SslConfigStatus. */ - public static final SslConfigStatus ENABLED = fromString("Enabled"); - - /** Static value Auto for SslConfigStatus. */ - public static final SslConfigStatus AUTO = fromString("Auto"); - - /** - * Creates a new instance of SslConfigStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SslConfigStatus() { - } - - /** - * Creates or finds a SslConfigStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding SslConfigStatus. - */ - @JsonCreator - public static SslConfigStatus fromString(String name) { - return fromString(name, SslConfigStatus.class); - } - - /** - * Gets known SslConfigStatus values. - * - * @return known SslConfigStatus values. - */ - public static Collection values() { - return values(SslConfigStatus.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.java deleted file mode 100644 index 894cce612693..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SslConfiguration.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.fasterxml.jackson.annotation.JsonProperty; - -/** The ssl configuration for scoring. */ -@Fluent -public final class SslConfiguration { - /* - * Enable or disable ssl for scoring - */ - @JsonProperty(value = "status") - private SslConfigStatus 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; - - /** Creates an instance of SslConfiguration class. */ - public SslConfiguration() { - } - - /** - * Get the status property: Enable or disable ssl for scoring. - * - * @return the status value. - */ - public SslConfigStatus status() { - return this.status; - } - - /** - * Set the status property: Enable or disable ssl for scoring. - * - * @param status the status value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withStatus(SslConfigStatus status) { - this.status = status; - return this; - } - - /** - * Get the cert property: Cert data. - * - * @return the cert value. - */ - public String cert() { - return this.cert; - } - - /** - * Set the cert property: Cert data. - * - * @param cert the cert value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCert(String cert) { - this.cert = cert; - return this; - } - - /** - * Get the key property: Key data. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: Key data. - * - * @param key the key value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the cname property: CNAME of the cert. - * - * @return the cname value. - */ - public String cname() { - return this.cname; - } - - /** - * Set the cname property: CNAME of the cert. - * - * @param cname the cname value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withCname(String cname) { - this.cname = cname; - return this; - } - - /** - * Get the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @return the leafDomainLabel value. - */ - public String leafDomainLabel() { - return this.leafDomainLabel; - } - - /** - * Set the leafDomainLabel property: Leaf domain label of public endpoint. - * - * @param leafDomainLabel the leafDomainLabel value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withLeafDomainLabel(String leafDomainLabel) { - this.leafDomainLabel = leafDomainLabel; - return this; - } - - /** - * Get the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @return the overwriteExistingDomain value. - */ - public Boolean overwriteExistingDomain() { - return this.overwriteExistingDomain; - } - - /** - * Set the overwriteExistingDomain property: Indicates whether to overwrite existing domain label. - * - * @param overwriteExistingDomain the overwriteExistingDomain value to set. - * @return the SslConfiguration object itself. - */ - public SslConfiguration withOverwriteExistingDomain(Boolean overwriteExistingDomain) { - this.overwriteExistingDomain = overwriteExistingDomain; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 d0081827f033..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackEnsembleSettings.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; - -/** 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; - - /** Creates an instance of StackEnsembleSettings class. */ - public StackEnsembleSettings() { - } - - /** - * 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 cd5e9dba54d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StackMetaLearnerType.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; - -/** - * The meta-learner is a model trained on the output of the individual heterogeneous models. Default meta-learners are - * LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet - * for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). This parameter can be one of the - * following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, - * LightGBMRegressor, or LinearRegression. - */ -public final class StackMetaLearnerType extends ExpandableStringEnum { - /** Static value None for StackMetaLearnerType. */ - public static final StackMetaLearnerType NONE = fromString("None"); - - /** Static value LogisticRegression for StackMetaLearnerType. */ - public static final StackMetaLearnerType LOGISTIC_REGRESSION = fromString("LogisticRegression"); - - /** Static value LogisticRegressionCV for StackMetaLearnerType. */ - public static final StackMetaLearnerType LOGISTIC_REGRESSION_CV = fromString("LogisticRegressionCV"); - - /** Static value LightGBMClassifier for StackMetaLearnerType. */ - public static final StackMetaLearnerType LIGHT_GBMCLASSIFIER = fromString("LightGBMClassifier"); - - /** Static value ElasticNet for StackMetaLearnerType. */ - public static final StackMetaLearnerType ELASTIC_NET = fromString("ElasticNet"); - - /** Static value ElasticNetCV for StackMetaLearnerType. */ - public static final StackMetaLearnerType ELASTIC_NET_CV = fromString("ElasticNetCV"); - - /** Static value LightGBMRegressor for StackMetaLearnerType. */ - public static final StackMetaLearnerType LIGHT_GBMREGRESSOR = fromString("LightGBMRegressor"); - - /** Static value LinearRegression for StackMetaLearnerType. */ - public static final StackMetaLearnerType LINEAR_REGRESSION = fromString("LinearRegression"); - - /** - * Creates a new instance of StackMetaLearnerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StackMetaLearnerType() { - } - - /** - * Creates or finds a StackMetaLearnerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StackMetaLearnerType. - */ - @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 c4aa1a421e11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Status.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Update Workspace Quota Status. - * - *

Status of update workspace quota. - */ -public final class Status extends ExpandableStringEnum { - /** Static value Undefined for Status. */ - public static final Status UNDEFINED = fromString("Undefined"); - - /** Static value Success for Status. */ - public static final Status SUCCESS = fromString("Success"); - - /** Static value Failure for Status. */ - public static final Status FAILURE = fromString("Failure"); - - /** Static value InvalidQuotaBelowClusterMinimum for Status. */ - public static final Status INVALID_QUOTA_BELOW_CLUSTER_MINIMUM = fromString("InvalidQuotaBelowClusterMinimum"); - - /** Static value InvalidQuotaExceedsSubscriptionLimit for Status. */ - public static final Status INVALID_QUOTA_EXCEEDS_SUBSCRIPTION_LIMIT = - fromString("InvalidQuotaExceedsSubscriptionLimit"); - - /** Static value InvalidVMFamilyName for Status. */ - public static final Status INVALID_VMFAMILY_NAME = fromString("InvalidVMFamilyName"); - - /** Static value OperationNotSupportedForSku for Status. */ - public static final Status OPERATION_NOT_SUPPORTED_FOR_SKU = fromString("OperationNotSupportedForSku"); - - /** Static value OperationNotEnabledForRegion for Status. */ - public static final Status OPERATION_NOT_ENABLED_FOR_REGION = fromString("OperationNotEnabledForRegion"); - - /** - * Creates a new instance of Status value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Status() { - } - - /** - * Creates or finds a Status from its string representation. - * - * @param name a name to look for. - * @return the corresponding Status. - */ - @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 7fcd721f062b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StochasticOptimizer.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; - -/** Stochastic optimizer for image models. */ -public final class StochasticOptimizer extends ExpandableStringEnum { - /** Static value None for StochasticOptimizer. */ - public static final StochasticOptimizer NONE = fromString("None"); - - /** Static value Sgd for StochasticOptimizer. */ - public static final StochasticOptimizer SGD = fromString("Sgd"); - - /** Static value Adam for StochasticOptimizer. */ - public static final StochasticOptimizer ADAM = fromString("Adam"); - - /** Static value Adamw for StochasticOptimizer. */ - public static final StochasticOptimizer ADAMW = fromString("Adamw"); - - /** - * Creates a new instance of StochasticOptimizer value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StochasticOptimizer() { - } - - /** - * Creates or finds a StochasticOptimizer from its string representation. - * - * @param name a name to look for. - * @return the corresponding StochasticOptimizer. - */ - @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 faa2e9484d9e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/StorageAccountType.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; - -/** type of this storage account. */ -public final class StorageAccountType extends ExpandableStringEnum { - /** Static value Standard_LRS for StorageAccountType. */ - public static final StorageAccountType STANDARD_LRS = fromString("Standard_LRS"); - - /** Static value Premium_LRS for StorageAccountType. */ - public static final StorageAccountType PREMIUM_LRS = fromString("Premium_LRS"); - - /** - * Creates a new instance of StorageAccountType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageAccountType() { - } - - /** - * Creates or finds a StorageAccountType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageAccountType. - */ - @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 0a72071e3d48..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJob.java +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT 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 JobBaseProperties { - /* - * 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; - - /** Creates an instance of SweepJob class. */ - public SweepJob() { - } - - /** - * 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 withComponentId(String componentId) { - super.withComponentId(componentId); - 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 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 6bca811bd403..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SweepJobLimits.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of SweepJobLimits class. */ - public SweepJobLimits() { - } - - /** - * 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 287f483c9931..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSpark.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of SynapseSpark class. */ - public SynapseSpark() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public SynapseSpark withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 29e0a16a673d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SynapseSparkProperties.java +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the 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; - - /** Creates an instance of SynapseSparkProperties class. */ - public SynapseSparkProperties() { - } - - /** - * Get the autoScaleProperties property: Auto scale properties. - * - * @return the autoScaleProperties value. - */ - public AutoScaleProperties autoScaleProperties() { - return this.autoScaleProperties; - } - - /** - * Set the autoScaleProperties property: Auto scale properties. - * - * @param autoScaleProperties the autoScaleProperties value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withAutoScaleProperties(AutoScaleProperties autoScaleProperties) { - this.autoScaleProperties = autoScaleProperties; - return this; - } - - /** - * Get the autoPauseProperties property: Auto pause properties. - * - * @return the autoPauseProperties value. - */ - public AutoPauseProperties autoPauseProperties() { - return this.autoPauseProperties; - } - - /** - * Set the autoPauseProperties property: Auto pause properties. - * - * @param autoPauseProperties the autoPauseProperties value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withAutoPauseProperties(AutoPauseProperties autoPauseProperties) { - this.autoPauseProperties = autoPauseProperties; - return this; - } - - /** - * Get the sparkVersion property: Spark version. - * - * @return the sparkVersion value. - */ - public String sparkVersion() { - return this.sparkVersion; - } - - /** - * Set the sparkVersion property: Spark version. - * - * @param sparkVersion the sparkVersion value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withSparkVersion(String sparkVersion) { - this.sparkVersion = sparkVersion; - return this; - } - - /** - * Get the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The number of compute nodes currently assigned to the compute. - * - * @param nodeCount the nodeCount value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the nodeSize property: Node size. - * - * @return the nodeSize value. - */ - public String nodeSize() { - return this.nodeSize; - } - - /** - * Set the nodeSize property: Node size. - * - * @param nodeSize the nodeSize value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeSize(String nodeSize) { - this.nodeSize = nodeSize; - return this; - } - - /** - * Get the nodeSizeFamily property: Node size family. - * - * @return the nodeSizeFamily value. - */ - public String nodeSizeFamily() { - return this.nodeSizeFamily; - } - - /** - * Set the nodeSizeFamily property: Node size family. - * - * @param nodeSizeFamily the nodeSizeFamily value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withNodeSizeFamily(String nodeSizeFamily) { - this.nodeSizeFamily = nodeSizeFamily; - return this; - } - - /** - * Get the subscriptionId property: Azure subscription identifier. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Azure subscription identifier. - * - * @param subscriptionId the subscriptionId value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get the resourceGroup property: Name of the resource group in which workspace is located. - * - * @return the resourceGroup value. - */ - public String resourceGroup() { - return this.resourceGroup; - } - - /** - * Set the resourceGroup property: Name of the resource group in which workspace is located. - * - * @param resourceGroup the resourceGroup value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withResourceGroup(String resourceGroup) { - this.resourceGroup = resourceGroup; - return this; - } - - /** - * Get the workspaceName property: Name of Azure Machine Learning workspace. - * - * @return the workspaceName value. - */ - public String workspaceName() { - return this.workspaceName; - } - - /** - * Set the workspaceName property: Name of Azure Machine Learning workspace. - * - * @param workspaceName the workspaceName value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withWorkspaceName(String workspaceName) { - this.workspaceName = workspaceName; - return this; - } - - /** - * Get the poolName property: Pool name. - * - * @return the poolName value. - */ - public String poolName() { - return this.poolName; - } - - /** - * Set the poolName property: Pool name. - * - * @param poolName the poolName value to set. - * @return the SynapseSparkProperties object itself. - */ - public SynapseSparkProperties withPoolName(String poolName) { - this.poolName = poolName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScaleProperties() != null) { - autoScaleProperties().validate(); - } - if (autoPauseProperties() != null) { - autoPauseProperties().validate(); - } - } -} 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 3bdbdeaf51e7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/SystemService.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of SystemService class. */ - public SystemService() { - } - - /** - * Get the systemServiceType property: The type of this system service. - * - * @return the systemServiceType value. - */ - public String systemServiceType() { - return this.systemServiceType; - } - - /** - * Get the publicIpAddress property: Public IP address. - * - * @return the publicIpAddress value. - */ - public String publicIpAddress() { - return this.publicIpAddress; - } - - /** - * Get the version property: The version for this type. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 c9bb43ee0443..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVertical.java +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting. */ -@Fluent -public class TableVertical { - /* - * Columns to use for CVSplit data. - */ - @JsonProperty(value = "cvSplitColumnNames") - private List cvSplitColumnNames; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private TableVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private TableVerticalLimitSettings limitSettings; - - /* - * Number of cross validation folds to be applied on training dataset - * when validation dataset is not provided. - */ - @JsonProperty(value = "nCrossValidations") - private NCrossValidations nCrossValidations; - - /* - * Test data input. - */ - @JsonProperty(value = "testData") - private MLTableJobInput testData; - - /* - * 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; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /* - * The fraction of training dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) - * Applied when validation dataset is not provided. - */ - @JsonProperty(value = "validationDataSize") - private Double validationDataSize; - - /* - * 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; - - /** Creates an instance of TableVertical class. */ - public TableVertical() { - } - - /** - * Get the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @return the cvSplitColumnNames value. - */ - public List cvSplitColumnNames() { - return this.cvSplitColumnNames; - } - - /** - * Set the cvSplitColumnNames property: Columns to use for CVSplit data. - * - * @param cvSplitColumnNames the cvSplitColumnNames value to set. - * @return the TableVertical object itself. - */ - public TableVertical withCvSplitColumnNames(List cvSplitColumnNames) { - this.cvSplitColumnNames = cvSplitColumnNames; - return this; - } - - /** - * Get the 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 nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @return the nCrossValidations value. - */ - public NCrossValidations nCrossValidations() { - return this.nCrossValidations; - } - - /** - * Set the nCrossValidations property: Number of cross validation folds to be applied on training dataset when - * validation dataset is not provided. - * - * @param nCrossValidations the nCrossValidations value to set. - * @return the TableVertical object itself. - */ - public TableVertical withNCrossValidations(NCrossValidations nCrossValidations) { - this.nCrossValidations = nCrossValidations; - return this; - } - - /** - * Get the testData property: Test data input. - * - * @return the testData value. - */ - public MLTableJobInput testData() { - return this.testData; - } - - /** - * Set the testData property: Test data input. - * - * @param testData the testData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestData(MLTableJobInput testData) { - this.testData = testData; - return this; - } - - /** - * Get the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the testDataSize value. - */ - public Double testDataSize() { - return this.testDataSize; - } - - /** - * Set the testDataSize property: The fraction of test dataset that needs to be set aside for validation purpose. - * Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param testDataSize the testDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withTestDataSize(Double testDataSize) { - this.testDataSize = testDataSize; - return this; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** - * Get the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @return the validationDataSize value. - */ - public Double validationDataSize() { - return this.validationDataSize; - } - - /** - * Set the validationDataSize property: The fraction of training dataset that needs to be set aside for validation - * purpose. Values between (0.0 , 1.0) Applied when validation dataset is not provided. - * - * @param validationDataSize the validationDataSize value to set. - * @return the TableVertical object itself. - */ - public TableVertical withValidationDataSize(Double validationDataSize) { - this.validationDataSize = validationDataSize; - return this; - } - - /** - * Get the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @return the weightColumnName value. - */ - public String weightColumnName() { - return this.weightColumnName; - } - - /** - * Set the weightColumnName property: The name of the sample weight column. Automated ML supports a weighted column - * as an input, causing rows in the data to be weighted up or down. - * - * @param weightColumnName the weightColumnName value to set. - * @return the TableVertical object itself. - */ - public TableVertical withWeightColumnName(String weightColumnName) { - this.weightColumnName = weightColumnName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (nCrossValidations() != null) { - nCrossValidations().validate(); - } - if (testData() != null) { - testData().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 d7ab964abe6d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalFeaturizationSettings.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.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; - - /* - * 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; - - /** Creates an instance of TableVerticalFeaturizationSettings class. */ - public TableVerticalFeaturizationSettings() { - } - - /** - * 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 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 92ee3e6cee9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TableVerticalLimitSettings.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of TableVerticalLimitSettings class. */ - public TableVerticalLimitSettings() { - } - - /** - * 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/TargetAggregationFunction.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.java deleted file mode 100644 index 49604b181527..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetAggregationFunction.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; - -/** Target aggregate function. */ -public final class TargetAggregationFunction extends ExpandableStringEnum { - /** Static value None for TargetAggregationFunction. */ - public static final TargetAggregationFunction NONE = fromString("None"); - - /** Static value Sum for TargetAggregationFunction. */ - public static final TargetAggregationFunction SUM = fromString("Sum"); - - /** Static value Max for TargetAggregationFunction. */ - public static final TargetAggregationFunction MAX = fromString("Max"); - - /** Static value Min for TargetAggregationFunction. */ - public static final TargetAggregationFunction MIN = fromString("Min"); - - /** Static value Mean for TargetAggregationFunction. */ - public static final TargetAggregationFunction MEAN = fromString("Mean"); - - /** - * Creates a new instance of TargetAggregationFunction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetAggregationFunction() { - } - - /** - * Creates or finds a TargetAggregationFunction from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetAggregationFunction. - */ - @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 fccdc8d599ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLags.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.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 { - /** Creates an instance of TargetLags class. */ - public 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 ef47b6b6d6b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetLagsMode.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; - -/** Target lags selection modes. */ -public final class TargetLagsMode extends ExpandableStringEnum { - /** Static value Auto for TargetLagsMode. */ - public static final TargetLagsMode AUTO = fromString("Auto"); - - /** Static value Custom for TargetLagsMode. */ - public static final TargetLagsMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of TargetLagsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetLagsMode() { - } - - /** - * Creates or finds a TargetLagsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetLagsMode. - */ - @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 3596ee80736e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSize.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.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 { - /** Creates an instance of TargetRollingWindowSize class. */ - public 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 abd6fa5e2f67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetRollingWindowSizeMode.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; - -/** Target rolling windows size mode. */ -public final class TargetRollingWindowSizeMode extends ExpandableStringEnum { - /** Static value Auto for TargetRollingWindowSizeMode. */ - public static final TargetRollingWindowSizeMode AUTO = fromString("Auto"); - - /** Static value Custom for TargetRollingWindowSizeMode. */ - public static final TargetRollingWindowSizeMode CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of TargetRollingWindowSizeMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TargetRollingWindowSizeMode() { - } - - /** - * Creates or finds a TargetRollingWindowSizeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding TargetRollingWindowSizeMode. - */ - @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 c40f464a708f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TargetUtilizationScaleSettings.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; -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; - - /** Creates an instance of TargetUtilizationScaleSettings class. */ - public TargetUtilizationScaleSettings() { - } - - /** - * 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 abf23d57afbb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TaskType.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; - -/** AutoMLJob Task type. */ -public final class TaskType extends ExpandableStringEnum { - /** Static value Classification for TaskType. */ - public static final TaskType CLASSIFICATION = fromString("Classification"); - - /** Static value Regression for TaskType. */ - public static final TaskType REGRESSION = fromString("Regression"); - - /** Static value Forecasting for TaskType. */ - public static final TaskType FORECASTING = fromString("Forecasting"); - - /** Static value ImageClassification for TaskType. */ - public static final TaskType IMAGE_CLASSIFICATION = fromString("ImageClassification"); - - /** Static value ImageClassificationMultilabel for TaskType. */ - public static final TaskType IMAGE_CLASSIFICATION_MULTILABEL = fromString("ImageClassificationMultilabel"); - - /** Static value ImageObjectDetection for TaskType. */ - public static final TaskType IMAGE_OBJECT_DETECTION = fromString("ImageObjectDetection"); - - /** Static value ImageInstanceSegmentation for TaskType. */ - public static final TaskType IMAGE_INSTANCE_SEGMENTATION = fromString("ImageInstanceSegmentation"); - - /** Static value TextClassification for TaskType. */ - public static final TaskType TEXT_CLASSIFICATION = fromString("TextClassification"); - - /** Static value TextClassificationMultilabel for TaskType. */ - public static final TaskType TEXT_CLASSIFICATION_MULTILABEL = fromString("TextClassificationMultilabel"); - - /** Static value TextNER for TaskType. */ - public static final TaskType TEXT_NER = fromString("TextNER"); - - /** - * Creates a new instance of TaskType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TaskType() { - } - - /** - * Creates or finds a TaskType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TaskType. - */ - @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 618e0345d142..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TensorFlow.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.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; - - /** Creates an instance of TensorFlow class. */ - public TensorFlow() { - } - - /** - * 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/TextClassification.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java deleted file mode 100644 index 72f0a652601e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassification.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /** Creates an instance of TextClassification class. */ - public TextClassification() { - } - - /** - * 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 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; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextClassification object itself. - */ - public TextClassification withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassification withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassification withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassification withTrainingData(MLTableJobInput 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 (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (validationData() != null) { - validationData().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 ceb85f9675e7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextClassificationMultilabel.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /** Creates an instance of TextClassificationMultilabel class. */ - public TextClassificationMultilabel() { - } - - /** - * 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 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; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextClassificationMultilabel object itself. - */ - public TextClassificationMultilabel withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassificationMultilabel withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassificationMultilabel withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextClassificationMultilabel withTrainingData(MLTableJobInput 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 (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (validationData() != null) { - validationData().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 ed17e1f9beb2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TextNer.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /* - * Featurization inputs needed for AutoML job. - */ - @JsonProperty(value = "featurizationSettings") - private NlpVerticalFeaturizationSettings featurizationSettings; - - /* - * Execution constraints for AutoMLJob. - */ - @JsonProperty(value = "limitSettings") - private NlpVerticalLimitSettings limitSettings; - - /* - * Validation data inputs. - */ - @JsonProperty(value = "validationData") - private MLTableJobInput validationData; - - /** Creates an instance of TextNer class. */ - public TextNer() { - } - - /** - * 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 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; - } - - /** - * Get the validationData property: Validation data inputs. - * - * @return the validationData value. - */ - public MLTableJobInput validationData() { - return this.validationData; - } - - /** - * Set the validationData property: Validation data inputs. - * - * @param validationData the validationData value to set. - * @return the TextNer object itself. - */ - public TextNer withValidationData(MLTableJobInput validationData) { - this.validationData = validationData; - return this; - } - - /** {@inheritDoc} */ - @Override - public TextNer withLogVerbosity(LogVerbosity logVerbosity) { - super.withLogVerbosity(logVerbosity); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextNer withTargetColumnName(String targetColumnName) { - super.withTargetColumnName(targetColumnName); - return this; - } - - /** {@inheritDoc} */ - @Override - public TextNer withTrainingData(MLTableJobInput 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 (featurizationSettings() != null) { - featurizationSettings().validate(); - } - if (limitSettings() != null) { - limitSettings().validate(); - } - if (validationData() != null) { - validationData().validate(); - } - } -} 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 cade4da66865..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrainingSettings.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.Duration; - -/** Training related configuration. */ -@Fluent -public 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; - - /** Creates an instance of TrainingSettings class. */ - public TrainingSettings() { - } - - /** - * 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 71293f3a75c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TrialComponent.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.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 JobResourceConfiguration resources; - - /** Creates an instance of TrialComponent class. */ - public TrialComponent() { - } - - /** - * Get the codeId property: ARM resource ID of the code asset. - * - * @return the codeId value. - */ - public String codeId() { - return this.codeId; - } - - /** - * Set the codeId property: ARM resource ID of the code asset. - * - * @param codeId the codeId value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withCodeId(String codeId) { - this.codeId = codeId; - return this; - } - - /** - * Get the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @return the command value. - */ - public String command() { - return this.command; - } - - /** - * Set the command property: [Required] The command to execute on startup of the job. eg. "python train.py". - * - * @param command the command value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withCommand(String command) { - this.command = command; - return this; - } - - /** - * Get the 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 JobResourceConfiguration resources() { - return this.resources; - } - - /** - * Set the resources property: Compute Resource configuration for the job. - * - * @param resources the resources value to set. - * @return the TrialComponent object itself. - */ - public TrialComponent withResources(JobResourceConfiguration resources) { - this.resources = resources; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (command() == null) { - throw LOGGER - .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/TriggerBase.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java deleted file mode 100644 index b7180fe49f25..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerBase.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** The TriggerBase model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "triggerType", - defaultImpl = TriggerBase.class) -@JsonTypeName("TriggerBase") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "Recurrence", value = RecurrenceTrigger.class), - @JsonSubTypes.Type(name = "Cron", value = CronTrigger.class) -}) -@Fluent -public class TriggerBase { - /* - * Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. - * Recommented format would be "2022-06-01T00:00:01" - * If not present, the schedule will run indefinitely - */ - @JsonProperty(value = "endTime") - private String endTime; - - /* - * Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - */ - @JsonProperty(value = "startTime") - private String startTime; - - /* - * Specifies time zone in which the schedule runs. - * TimeZone should follow Windows time zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 - */ - @JsonProperty(value = "timeZone") - private String timeZone; - - /** Creates an instance of TriggerBase class. */ - public TriggerBase() { - } - - /** - * Get the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the - * schedule will run indefinitely. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer - * https://en.wikipedia.org/wiki/ISO_8601. Recommented format would be "2022-06-01T00:00:01" If not present, the - * schedule will run indefinitely. - * - * @param endTime the endTime value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Specifies start time of schedule in ISO 8601 format, but without a UTC offset. - * - * @param startTime the startTime value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @return the timeZone value. - */ - public String timeZone() { - return this.timeZone; - } - - /** - * Set the timeZone property: Specifies time zone in which the schedule runs. TimeZone should follow Windows time - * zone format. Refer: - * https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11. - * - * @param timeZone the timeZone value to set. - * @return the TriggerBase object itself. - */ - public TriggerBase withTimeZone(String timeZone) { - this.timeZone = timeZone; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.java deleted file mode 100644 index 4f9332d727ac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TriggerType.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 TriggerType. */ -public final class TriggerType extends ExpandableStringEnum { - /** Static value Recurrence for TriggerType. */ - public static final TriggerType RECURRENCE = fromString("Recurrence"); - - /** Static value Cron for TriggerType. */ - public static final TriggerType CRON = fromString("Cron"); - - /** - * Creates a new instance of TriggerType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TriggerType() { - } - - /** - * Creates or finds a TriggerType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TriggerType. - */ - @JsonCreator - public static TriggerType fromString(String name) { - return fromString(name, TriggerType.class); - } - - /** - * Gets known TriggerType values. - * - * @return known TriggerType values. - */ - public static Collection values() { - return values(TriggerType.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.java deleted file mode 100644 index 44b616664524..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobInput.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.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("triton_model") -@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; - - /** Creates an instance of TritonModelJobInput class. */ - public TritonModelJobInput() { - } - - /** - * 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 f7630d5f5c70..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TritonModelJobOutput.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 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("triton_model") -@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; - - /** Creates an instance of TritonModelJobOutput class. */ - public TritonModelJobOutput() { - } - - /** - * 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 2399793310aa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/TruncationSelectionPolicy.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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; - - /** Creates an instance of TruncationSelectionPolicy class. */ - public TruncationSelectionPolicy() { - } - - /** - * 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 f9bb3d7df596..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnderlyingResourceAction.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 UnderlyingResourceAction. */ -public final class UnderlyingResourceAction extends ExpandableStringEnum { - /** Static value Delete for UnderlyingResourceAction. */ - public static final UnderlyingResourceAction DELETE = fromString("Delete"); - - /** Static value Detach for UnderlyingResourceAction. */ - public static final UnderlyingResourceAction DETACH = fromString("Detach"); - - /** - * Creates a new instance of UnderlyingResourceAction value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnderlyingResourceAction() { - } - - /** - * Creates or finds a UnderlyingResourceAction from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnderlyingResourceAction. - */ - @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 05ae959e99b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UnitOfMeasure.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * Unit of time measure - * - *

The unit of time measurement for the specified VM price. Example: OneHour. - */ -public final class UnitOfMeasure extends ExpandableStringEnum { - /** Static value OneHour for UnitOfMeasure. */ - public static final UnitOfMeasure ONE_HOUR = fromString("OneHour"); - - /** - * Creates a new instance of UnitOfMeasure value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UnitOfMeasure() { - } - - /** - * Creates or finds a UnitOfMeasure from its string representation. - * - * @param name a name to look for. - * @return the corresponding UnitOfMeasure. - */ - @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 88d2a8f9fa55..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UpdateWorkspaceQuotas.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of UpdateWorkspaceQuotas class. */ - public UpdateWorkspaceQuotas() { - } - - /** - * Get the id property: Specifies the resource ID. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the type property: Specifies the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the limit property: 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 9315ebeaa797..000000000000 --- 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 0fe62c32561a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileDataVersion.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.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("uri_file") -@Fluent -public final class UriFileDataVersion extends DataVersionBaseProperties { - /** Creates an instance of UriFileDataVersion class. */ - public UriFileDataVersion() { - } - - /** {@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 c52666009a7f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobInput.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.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("uri_file") -@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; - - /** Creates an instance of UriFileJobInput class. */ - public UriFileJobInput() { - } - - /** - * 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 e59ccfb629ef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFileJobOutput.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 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("uri_file") -@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; - - /** Creates an instance of UriFileJobOutput class. */ - public UriFileJobOutput() { - } - - /** - * 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 5904ef425eb8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderDataVersion.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.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("uri_folder") -@Fluent -public final class UriFolderDataVersion extends DataVersionBaseProperties { - /** Creates an instance of UriFolderDataVersion class. */ - public UriFolderDataVersion() { - } - - /** {@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 1434274fa4f7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobInput.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.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("uri_folder") -@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; - - /** Creates an instance of UriFolderJobInput class. */ - public UriFolderJobInput() { - } - - /** - * 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 c0a7ef31b48f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UriFolderJobOutput.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 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("uri_folder") -@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; - - /** Creates an instance of UriFolderJobOutput class. */ - public UriFolderJobOutput() { - } - - /** - * 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 c98ae6d12807..000000000000 --- 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 de4afdbbbac5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageName.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; - -/** 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; - - /** Creates an instance of UsageName class. */ - public UsageName() { - } - - /** - * Get the value property: The name of the resource. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the localizedValue property: The localized name of the resource. - * - * @return the localizedValue value. - */ - public String localizedValue() { - return this.localizedValue; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 a9cc9108faf8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsageUnit.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; - -/** An enum describing the unit of usage measurement. */ -public final class UsageUnit extends ExpandableStringEnum { - /** Static value Count for UsageUnit. */ - public static final UsageUnit COUNT = fromString("Count"); - - /** - * Creates a new instance of UsageUnit value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UsageUnit() { - } - - /** - * Creates or finds a UsageUnit from its string representation. - * - * @param name a name to look for. - * @return the corresponding UsageUnit. - */ - @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 829c32dc4250..000000000000 --- 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 25769eb8e8b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UseStl.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; - -/** Configure STL Decomposition of the time-series target column. */ -public final class UseStl extends ExpandableStringEnum { - /** Static value None for UseStl. */ - public static final UseStl NONE = fromString("None"); - - /** Static value Season for UseStl. */ - public static final UseStl SEASON = fromString("Season"); - - /** Static value SeasonTrend for UseStl. */ - public static final UseStl SEASON_TREND = fromString("SeasonTrend"); - - /** - * Creates a new instance of UseStl value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public UseStl() { - } - - /** - * Creates or finds a UseStl from its string representation. - * - * @param name a name to look for. - * @return the corresponding UseStl. - */ - @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 617f6a6e5ec2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAccountCredentials.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; - -/** 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; - - /** Creates an instance of UserAccountCredentials class. */ - public UserAccountCredentials() { - } - - /** - * 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 efc6c81be31d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserAssignedIdentity.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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; - - /** Creates an instance of UserAssignedIdentity class. */ - public UserAssignedIdentity() { - } - - /** - * Get the principalId property: The principal ID of the assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * Get the clientId property: The client ID of the assigned identity. - * - * @return the clientId value. - */ - public UUID clientId() { - return this.clientId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/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 bd76cf17193e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UserIdentity.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.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 { - /** Creates an instance of UserIdentity class. */ - public UserIdentity() { - } - - /** - * 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/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java deleted file mode 100644 index c63b03a2f601..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/UsernamePasswordAuthTypeWorkspaceConnectionProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 UsernamePasswordAuthTypeWorkspaceConnectionProperties model. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") -@JsonTypeName("UsernamePassword") -@Fluent -public final class UsernamePasswordAuthTypeWorkspaceConnectionProperties extends WorkspaceConnectionPropertiesV2 { - /* - * The credentials property. - */ - @JsonProperty(value = "credentials") - private WorkspaceConnectionUsernamePassword credentials; - - /** Creates an instance of UsernamePasswordAuthTypeWorkspaceConnectionProperties class. */ - public UsernamePasswordAuthTypeWorkspaceConnectionProperties() { - } - - /** - * Get the credentials property: The credentials property. - * - * @return the credentials value. - */ - public WorkspaceConnectionUsernamePassword credentials() { - return this.credentials; - } - - /** - * Set the credentials property: The credentials property. - * - * @param credentials the credentials value to set. - * @return the UsernamePasswordAuthTypeWorkspaceConnectionProperties object itself. - */ - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCredentials( - WorkspaceConnectionUsernamePassword credentials) { - this.credentials = credentials; - return this; - } - - /** {@inheritDoc} */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withCategory(ConnectionCategory category) { - super.withCategory(category); - return this; - } - - /** {@inheritDoc} */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withTarget(String target) { - super.withTarget(target); - return this; - } - - /** {@inheritDoc} */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValue(String value) { - super.withValue(value); - return this; - } - - /** {@inheritDoc} */ - @Override - public UsernamePasswordAuthTypeWorkspaceConnectionProperties withValueFormat(ValueFormat valueFormat) { - super.withValueFormat(valueFormat); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (credentials() != null) { - credentials().validate(); - } - } -} 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 3b9e225d7d15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMPriceOSType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * OS type - * - *

Operating system type used by the VM. - */ -public final class VMPriceOSType extends ExpandableStringEnum { - /** Static value Linux for VMPriceOSType. */ - public static final VMPriceOSType LINUX = fromString("Linux"); - - /** Static value Windows for VMPriceOSType. */ - public static final VMPriceOSType WINDOWS = fromString("Windows"); - - /** - * Creates a new instance of VMPriceOSType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VMPriceOSType() { - } - - /** - * Creates or finds a VMPriceOSType from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMPriceOSType. - */ - @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 d7b857e72c84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VMTier.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.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** - * VM tier - * - *

The type of the VM. - */ -public final class VMTier extends ExpandableStringEnum { - /** Static value Standard for VMTier. */ - public static final VMTier STANDARD = fromString("Standard"); - - /** Static value LowPriority for VMTier. */ - public static final VMTier LOW_PRIORITY = fromString("LowPriority"); - - /** Static value Spot for VMTier. */ - public static final VMTier SPOT = fromString("Spot"); - - /** - * Creates a new instance of VMTier value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VMTier() { - } - - /** - * Creates or finds a VMTier from its string representation. - * - * @param name a name to look for. - * @return the corresponding VMTier. - */ - @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/ValidationMetricType.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.java deleted file mode 100644 index d7c8e2c6bc5d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValidationMetricType.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; - -/** Metric computation method to use for validation metrics in image tasks. */ -public final class ValidationMetricType extends ExpandableStringEnum { - /** Static value None for ValidationMetricType. */ - public static final ValidationMetricType NONE = fromString("None"); - - /** Static value Coco for ValidationMetricType. */ - public static final ValidationMetricType COCO = fromString("Coco"); - - /** Static value Voc for ValidationMetricType. */ - public static final ValidationMetricType VOC = fromString("Voc"); - - /** Static value CocoVoc for ValidationMetricType. */ - public static final ValidationMetricType COCO_VOC = fromString("CocoVoc"); - - /** - * Creates a new instance of ValidationMetricType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValidationMetricType() { - } - - /** - * Creates or finds a ValidationMetricType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValidationMetricType. - */ - @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 336be0e49444..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/ValueFormat.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; - -/** format for the workspace connection value. */ -public final class ValueFormat extends ExpandableStringEnum { - /** Static value JSON for ValueFormat. */ - public static final ValueFormat JSON = fromString("JSON"); - - /** - * Creates a new instance of ValueFormat value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ValueFormat() { - } - - /** - * Creates or finds a ValueFormat from its string representation. - * - * @param name a name to look for. - * @return the corresponding ValueFormat. - */ - @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 ace46f7abc11..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachine.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.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; - - /** Creates an instance of VirtualMachine class. */ - public VirtualMachine() { - } - - /** - * 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 withComputeLocation(String computeLocation) { - super.withComputeLocation(computeLocation); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withDescription(String description) { - super.withDescription(description); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withResourceId(String resourceId) { - super.withResourceId(resourceId); - return this; - } - - /** {@inheritDoc} */ - @Override - public VirtualMachine withDisableLocalAuth(Boolean disableLocalAuth) { - super.withDisableLocalAuth(disableLocalAuth); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - super.validate(); - if (properties() != null) { - properties().validate(); - } - } -} 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 bbbf91671967..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineImage.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.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; - - /** Creates an instance of VirtualMachineImage class. */ - public VirtualMachineImage() { - } - - /** - * Get the id property: Virtual Machine image path. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Virtual Machine image path. - * - * @param id the id value to set. - * @return the VirtualMachineImage object itself. - */ - public VirtualMachineImage withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER - .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 b519477bcd6e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The VirtualMachineSchema model. */ -@Fluent -public class VirtualMachineSchema { - /* - * The properties property. - */ - @JsonProperty(value = "properties") - private VirtualMachineSchemaProperties properties; - - /** Creates an instance of VirtualMachineSchema class. */ - public VirtualMachineSchema() { - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public VirtualMachineSchemaProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the VirtualMachineSchema object itself. - */ - public VirtualMachineSchema withProperties(VirtualMachineSchemaProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } -} 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 2b5d333a7a08..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSchemaProperties.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.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; - - /** Creates an instance of VirtualMachineSchemaProperties class. */ - public VirtualMachineSchemaProperties() { - } - - /** - * Get the virtualMachineSize property: Virtual Machine size. - * - * @return the virtualMachineSize value. - */ - public String virtualMachineSize() { - return this.virtualMachineSize; - } - - /** - * Set the virtualMachineSize property: Virtual Machine size. - * - * @param virtualMachineSize the virtualMachineSize value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withVirtualMachineSize(String virtualMachineSize) { - this.virtualMachineSize = virtualMachineSize; - return this; - } - - /** - * Get the sshPort property: Port open for ssh connections. - * - * @return the sshPort value. - */ - public Integer sshPort() { - return this.sshPort; - } - - /** - * Set the sshPort property: Port open for ssh connections. - * - * @param sshPort the sshPort value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withSshPort(Integer sshPort) { - this.sshPort = sshPort; - return this; - } - - /** - * Get the notebookServerPort property: Notebook server port open for ssh connections. - * - * @return the notebookServerPort value. - */ - public Integer notebookServerPort() { - return this.notebookServerPort; - } - - /** - * Set the notebookServerPort property: Notebook server port open for ssh connections. - * - * @param notebookServerPort the notebookServerPort value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withNotebookServerPort(Integer notebookServerPort) { - this.notebookServerPort = notebookServerPort; - return this; - } - - /** - * Get the address property: Public IP address of the virtual machine. - * - * @return the address value. - */ - public String address() { - return this.address; - } - - /** - * Set the address property: Public IP address of the virtual machine. - * - * @param address the address value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withAddress(String address) { - this.address = address; - return this; - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Get the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @return the isNotebookInstanceCompute value. - */ - public Boolean isNotebookInstanceCompute() { - return this.isNotebookInstanceCompute; - } - - /** - * Set the isNotebookInstanceCompute property: Indicates whether this compute will be used for running notebooks. - * - * @param isNotebookInstanceCompute the isNotebookInstanceCompute value to set. - * @return the VirtualMachineSchemaProperties object itself. - */ - public VirtualMachineSchemaProperties withIsNotebookInstanceCompute(Boolean isNotebookInstanceCompute) { - this.isNotebookInstanceCompute = isNotebookInstanceCompute; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} 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 3d8b393e3060..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecrets.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.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; - - /** Creates an instance of VirtualMachineSecrets class. */ - public VirtualMachineSecrets() { - } - - /** - * 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 f4554787497e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSecretsSchema.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.fasterxml.jackson.annotation.JsonProperty; - -/** The VirtualMachineSecretsSchema model. */ -@Fluent -public class VirtualMachineSecretsSchema { - /* - * Admin credentials for virtual machine. - */ - @JsonProperty(value = "administratorAccount") - private VirtualMachineSshCredentials administratorAccount; - - /** Creates an instance of VirtualMachineSecretsSchema class. */ - public VirtualMachineSecretsSchema() { - } - - /** - * Get the administratorAccount property: Admin credentials for virtual machine. - * - * @return the administratorAccount value. - */ - public VirtualMachineSshCredentials administratorAccount() { - return this.administratorAccount; - } - - /** - * Set the administratorAccount property: Admin credentials for virtual machine. - * - * @param administratorAccount the administratorAccount value to set. - * @return the VirtualMachineSecretsSchema object itself. - */ - public VirtualMachineSecretsSchema withAdministratorAccount(VirtualMachineSshCredentials administratorAccount) { - this.administratorAccount = administratorAccount; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (administratorAccount() != null) { - administratorAccount().validate(); - } - } -} 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 bc6f90030632..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSize.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 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; - - /** Creates an instance of VirtualMachineSize class. */ - public VirtualMachineSize() { - } - - /** - * 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 ea06dd868660..000000000000 --- 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 e1c429840f0f..000000000000 --- 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response along with {@link Response}. - */ - Response listWithResponse(String location, Context context); - - /** - * Returns supported VM Sizes in a location. - * - * @param location The location upon which virtual-machine-sizes is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the List Virtual Machine size operation response. - */ - VirtualMachineSizeListResult list(String location); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java deleted file mode 100644 index a29f0542a20b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VirtualMachineSshCredentials.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.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; - - /** Creates an instance of VirtualMachineSshCredentials class. */ - public VirtualMachineSshCredentials() { - } - - /** - * Get the username property: Username of admin account. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username of admin account. - * - * @param username the username value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: Password of admin account. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Password of admin account. - * - * @param password the password value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the publicKeyData property: Public key data. - * - * @return the publicKeyData value. - */ - public String publicKeyData() { - return this.publicKeyData; - } - - /** - * Set the publicKeyData property: Public key data. - * - * @param publicKeyData the publicKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPublicKeyData(String publicKeyData) { - this.publicKeyData = publicKeyData; - return this; - } - - /** - * Get the privateKeyData property: Private key data. - * - * @return the privateKeyData value. - */ - public String privateKeyData() { - return this.privateKeyData; - } - - /** - * Set the privateKeyData property: Private key data. - * - * @param privateKeyData the privateKeyData value to set. - * @return the VirtualMachineSshCredentials object itself. - */ - public VirtualMachineSshCredentials withPrivateKeyData(String privateKeyData) { - this.privateKeyData = privateKeyData; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} 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 4b5823d0d742..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/VmPriority.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; - -/** Virtual Machine priority. */ -public final class VmPriority extends ExpandableStringEnum { - /** Static value Dedicated for VmPriority. */ - public static final VmPriority DEDICATED = fromString("Dedicated"); - - /** Static value LowPriority for VmPriority. */ - public static final VmPriority LOW_PRIORITY = fromString("LowPriority"); - - /** - * Creates a new instance of VmPriority value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public VmPriority() { - } - - /** - * Creates or finds a VmPriority from its string representation. - * - * @param name a name to look for. - * @return the corresponding VmPriority. - */ - @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 20afef84d8ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WeekDay.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; - -/** Enum of weekday. */ -public final class WeekDay extends ExpandableStringEnum { - /** Static value Monday for WeekDay. */ - public static final WeekDay MONDAY = fromString("Monday"); - - /** Static value Tuesday for WeekDay. */ - public static final WeekDay TUESDAY = fromString("Tuesday"); - - /** Static value Wednesday for WeekDay. */ - public static final WeekDay WEDNESDAY = fromString("Wednesday"); - - /** Static value Thursday for WeekDay. */ - public static final WeekDay THURSDAY = fromString("Thursday"); - - /** Static value Friday for WeekDay. */ - public static final WeekDay FRIDAY = fromString("Friday"); - - /** Static value Saturday for WeekDay. */ - public static final WeekDay SATURDAY = fromString("Saturday"); - - /** Static value Sunday for WeekDay. */ - public static final WeekDay SUNDAY = fromString("Sunday"); - - /** - * Creates a new instance of WeekDay value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public WeekDay() { - } - - /** - * Creates or finds a WeekDay from its string representation. - * - * @param name a name to look for. - * @return the corresponding WeekDay. - */ - @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 42e253da0269..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspace.java +++ /dev/null @@ -1,881 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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 v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - Boolean v1LegacyMode(); - - /** - * Gets the 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, - DefinitionStages.WithV1LegacyMode { - /** - * 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); - } - /** The stage of the Workspace definition allowing to specify v1LegacyMode. */ - interface WithV1LegacyMode { - /** - * Specifies the v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided - * by the v2 API.. - * - * @param v1LegacyMode Enabling v1_legacy_mode may prevent you from using features provided by the v2 API. - * @return the next definition stage. - */ - WithCreate withV1LegacyMode(Boolean v1LegacyMode); - } - } - /** - * 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. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose(); - - /** - * Diagnose workspace setup issue. - * - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose(DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listKeysWithResponse(Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListWorkspaceKeysResult listKeys(); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(Context context); - - /** - * return notebook access token and refresh token. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listNotebookAccessTokenWithResponse(Context context); - - /** - * return notebook access token and refresh token. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookAccessTokenResult listNotebookAccessToken(); - - /** - * Prepare a notebook. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepareNotebook(); - - /** - * Prepare a notebook. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepareNotebook(Context context); - - /** - * List storage account keys of a workspace. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listStorageAccountKeysWithResponse(Context context); - - /** - * List storage account keys of a workspace. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListStorageAccountKeysResult listStorageAccountKeys(); - - /** - * List keys of a notebook. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listNotebookKeysWithResponse(Context context); - - /** - * List keys of a notebook. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListNotebookKeysResult listNotebookKeys(); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.java deleted file mode 100644 index 8f7d813b83b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionManagedIdentity.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; - -/** The WorkspaceConnectionManagedIdentity model. */ -@Fluent -public class WorkspaceConnectionManagedIdentity { - /* - * The resourceId property. - */ - @JsonProperty(value = "resourceId") - private String resourceId; - - /* - * The clientId property. - */ - @JsonProperty(value = "clientId") - private String clientId; - - /** Creates an instance of WorkspaceConnectionManagedIdentity class. */ - public WorkspaceConnectionManagedIdentity() { - } - - /** - * Get the resourceId property: The resourceId property. - * - * @return the resourceId value. - */ - public String resourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The resourceId property. - * - * @param resourceId the resourceId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. - */ - public WorkspaceConnectionManagedIdentity withResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the clientId property: The clientId property. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The clientId property. - * - * @param clientId the clientId value to set. - * @return the WorkspaceConnectionManagedIdentity object itself. - */ - public WorkspaceConnectionManagedIdentity withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.java deleted file mode 100644 index 67e3cac9d34e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPersonalAccessToken.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; - -/** The WorkspaceConnectionPersonalAccessToken model. */ -@Fluent -public final class WorkspaceConnectionPersonalAccessToken { - /* - * The pat property. - */ - @JsonProperty(value = "pat") - private String pat; - - /** Creates an instance of WorkspaceConnectionPersonalAccessToken class. */ - public WorkspaceConnectionPersonalAccessToken() { - } - - /** - * Get the pat property: The pat property. - * - * @return the pat value. - */ - public String pat() { - return this.pat; - } - - /** - * Set the pat property: The pat property. - * - * @param pat the pat value to set. - * @return the WorkspaceConnectionPersonalAccessToken object itself. - */ - public WorkspaceConnectionPersonalAccessToken withPat(String pat) { - this.pat = pat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.java deleted file mode 100644 index a0a871c9c248..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2.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; - -/** The WorkspaceConnectionPropertiesV2 model. */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "authType", - defaultImpl = WorkspaceConnectionPropertiesV2.class) -@JsonTypeName("WorkspaceConnectionPropertiesV2") -@JsonSubTypes({ - @JsonSubTypes.Type(name = "PAT", value = PatAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "SAS", value = SasAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "UsernamePassword", value = UsernamePasswordAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "None", value = NoneAuthTypeWorkspaceConnectionProperties.class), - @JsonSubTypes.Type(name = "ManagedIdentity", value = ManagedIdentityAuthTypeWorkspaceConnectionProperties.class) -}) -@Fluent -public class WorkspaceConnectionPropertiesV2 { - /* - * Category of the connection - */ - @JsonProperty(value = "category") - private ConnectionCategory category; - - /* - * The target property. - */ - @JsonProperty(value = "target") - private String target; - - /* - * Value details of the workspace connection. - */ - @JsonProperty(value = "value") - private String value; - - /* - * format for the workspace connection value - */ - @JsonProperty(value = "valueFormat") - private ValueFormat valueFormat; - - /** Creates an instance of WorkspaceConnectionPropertiesV2 class. */ - public WorkspaceConnectionPropertiesV2() { - } - - /** - * Get the category property: Category of the connection. - * - * @return the category value. - */ - public ConnectionCategory category() { - return this.category; - } - - /** - * Set the category property: Category of the connection. - * - * @param category the category value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withCategory(ConnectionCategory category) { - this.category = category; - return this; - } - - /** - * Get the target property: The target property. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The target property. - * - * @param target the target value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the value property: Value details of the workspace connection. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Value details of the workspace connection. - * - * @param value the value value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the valueFormat property: format for the workspace connection value. - * - * @return the valueFormat value. - */ - public ValueFormat valueFormat() { - return this.valueFormat; - } - - /** - * Set the valueFormat property: format for the workspace connection value. - * - * @param valueFormat the valueFormat value to set. - * @return the WorkspaceConnectionPropertiesV2 object itself. - */ - public WorkspaceConnectionPropertiesV2 withValueFormat(ValueFormat valueFormat) { - this.valueFormat = valueFormat; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.java deleted file mode 100644 index 22ef3cb48926..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResource.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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; - -/** An immutable client-side representation of WorkspaceConnectionPropertiesV2BasicResource. */ -public interface WorkspaceConnectionPropertiesV2BasicResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The properties property. - * - * @return the properties value. - */ - WorkspaceConnectionPropertiesV2 properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner - * com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner object. - * - * @return the inner object. - */ - WorkspaceConnectionPropertiesV2BasicResourceInner innerModel(); - - /** The entirety of the WorkspaceConnectionPropertiesV2BasicResource definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithParentResource, - DefinitionStages.WithProperties, - DefinitionStages.WithCreate { - } - /** The WorkspaceConnectionPropertiesV2BasicResource definition stages. */ - interface DefinitionStages { - /** The first stage of the WorkspaceConnectionPropertiesV2BasicResource definition. */ - interface Blank extends WithParentResource { - } - /** - * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, workspaceName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @return the next definition stage. - */ - WithProperties withExistingWorkspace(String resourceGroupName, String workspaceName); - } - /** The stage of the WorkspaceConnectionPropertiesV2BasicResource definition allowing to specify properties. */ - interface WithProperties { - /** - * Specifies the properties property: The properties property.. - * - * @param properties The properties property. - * @return the next definition stage. - */ - WithCreate withProperties(WorkspaceConnectionPropertiesV2 properties); - } - /** - * The stage of the WorkspaceConnectionPropertiesV2BasicResource definition which contains all the minimum - * required properties for the resource to be created, but also allows for any other optional properties to be - * specified. - */ - interface WithCreate { - /** - * Executes the create request. - * - * @return the created resource. - */ - WorkspaceConnectionPropertiesV2BasicResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - WorkspaceConnectionPropertiesV2BasicResource create(Context context); - } - } - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - WorkspaceConnectionPropertiesV2BasicResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - WorkspaceConnectionPropertiesV2BasicResource refresh(Context context); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.java deleted file mode 100644 index 96ab1a4a1025..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.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.annotation.Fluent; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** The WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model. */ -@Fluent -public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult { - /* - * The value property. - */ - @JsonProperty(value = "value") - private List value; - - /* - * The nextLink property. - */ - @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) - private String nextLink; - - /** Creates an instance of WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult class. */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult object itself. - */ - public WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult withValue( - List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The nextLink property. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.java deleted file mode 100644 index 2bbccdb32664..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionSharedAccessSignature.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; - -/** The WorkspaceConnectionSharedAccessSignature model. */ -@Fluent -public final class WorkspaceConnectionSharedAccessSignature { - /* - * The sas property. - */ - @JsonProperty(value = "sas") - private String sas; - - /** Creates an instance of WorkspaceConnectionSharedAccessSignature class. */ - public WorkspaceConnectionSharedAccessSignature() { - } - - /** - * Get the sas property: The sas property. - * - * @return the sas value. - */ - public String sas() { - return this.sas; - } - - /** - * Set the sas property: The sas property. - * - * @param sas the sas value to set. - * @return the WorkspaceConnectionSharedAccessSignature object itself. - */ - public WorkspaceConnectionSharedAccessSignature withSas(String sas) { - this.sas = sas; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.java deleted file mode 100644 index 3f8e8255feba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnectionUsernamePassword.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; - -/** The WorkspaceConnectionUsernamePassword model. */ -@Fluent -public final class WorkspaceConnectionUsernamePassword { - /* - * The username property. - */ - @JsonProperty(value = "username") - private String username; - - /* - * The password property. - */ - @JsonProperty(value = "password") - private String password; - - /** Creates an instance of WorkspaceConnectionUsernamePassword class. */ - public WorkspaceConnectionUsernamePassword() { - } - - /** - * Get the username property: The username property. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The username property. - * - * @param username the username value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. - */ - public WorkspaceConnectionUsernamePassword withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password property. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password property. - * - * @param password the password value to set. - * @return the WorkspaceConnectionUsernamePassword object itself. - */ - public WorkspaceConnectionUsernamePassword withPassword(String password) { - this.password = password; - return this; - } - - /** - * 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/WorkspaceConnections.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java deleted file mode 100644 index 2f00285075d1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceConnections.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of WorkspaceConnections. */ -public interface WorkspaceConnections { - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * The get operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - WorkspaceConnectionPropertiesV2BasicResource get( - String resourceGroupName, String workspaceName, String connectionName); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String connectionName, Context context); - - /** - * The delete operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param connectionName Friendly name of the workspace connection. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, String connectionName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String workspaceName); - - /** - * The list operation. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param target Target of the workspace connection. - * @param category Category of the workspace connection. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - PagedIterable list( - String resourceGroupName, String workspaceName, String target, String category, Context context); - - /** - * The get operation. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - WorkspaceConnectionPropertiesV2BasicResource getById(String id); - - /** - * The get operation. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * The delete operation. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * The delete operation. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new WorkspaceConnectionPropertiesV2BasicResource resource. - * - * @param name resource name. - * @return the first stage of the new WorkspaceConnectionPropertiesV2BasicResource definition. - */ - WorkspaceConnectionPropertiesV2BasicResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceFeatures.java deleted file mode 100644 index cbbbae1274d2..000000000000 --- 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 074c218cf7c5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceListResult.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.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; - - /** Creates an instance of WorkspaceListResult class. */ - public WorkspaceListResult() { - } - - /** - * Get the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of machine learning workspaces. Since this list may be incomplete, the nextLink - * field should be used to request the next list of machine learning workspaces. - * - * @param value the value value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI that can be used to request the next list of machine learning workspaces. - * - * @param nextLink the nextLink value to set. - * @return the WorkspaceListResult object itself. - */ - public WorkspaceListResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } -} 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 41e6d8c3f5a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceProperties.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.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 v1LegacyMode property: Enabling v1_legacy_mode may prevent you from using features provided by the v2 - * API. - * - * @return the v1LegacyMode value. - */ - Boolean v1LegacyMode(); - - /** - * Gets the 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 7d7ada04b8ee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/WorkspaceUpdateParameters.java +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.annotation.Fluent; -import com.azure.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; - - /** Creates an instance of WorkspaceUpdateParameters class. */ - public WorkspaceUpdateParameters() { - } - - /** - * Get the tags property: The resource tags for the machine learning workspace. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: The resource tags for the machine learning workspace. - * - * @param tags the tags value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the sku property: The sku of the workspace. - * - * @return the sku value. - */ - public Sku sku() { - return this.sku; - } - - /** - * Set the sku property: The sku of the workspace. - * - * @param sku the sku value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withSku(Sku sku) { - this.sku = sku; - return this; - } - - /** - * Get the identity property: The identity of the resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The identity of the resource. - * - * @param identity the identity value to set. - * @return the WorkspaceUpdateParameters object itself. - */ - public WorkspaceUpdateParameters withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: The properties that the machine learning workspace will be updated with. - * - * @return the innerProperties value. - */ - private 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 3d21925cc55f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/Workspaces.java +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** Resource collection API of Workspaces. */ -public interface Workspaces { - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace. - */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); - - /** - * Deletes a machine learning workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose(String resourceGroupName, String workspaceName); - - /** - * Diagnose workspace setup issue. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param parameters The parameter of diagnosing workspace health. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - DiagnoseResponseResult diagnose( - String resourceGroupName, String workspaceName, DiagnoseWorkspaceParameters parameters, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListWorkspaceKeysResult listKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(String resourceGroupName, String workspaceName); - - /** - * Resync all the keys associated with this workspace. This includes keys for the storage account, app insights and - * password for container registry. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void resyncKeys(String resourceGroupName, String workspaceName, Context context); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all the available machine learning workspaces under the specified subscription. - * - * @param skip Continuation token for pagination. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the result of a request to list machine learning workspaces as paginated response with {@link - * PagedIterable}. - */ - PagedIterable list(String skip, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listNotebookAccessTokenWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * return notebook access token and refresh token. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookAccessTokenResult listNotebookAccessToken(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName); - - /** - * Prepare a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - NotebookResourceInfo prepareNotebook(String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listStorageAccountKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * List storage account keys of a workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListStorageAccountKeysResult listStorageAccountKeys(String resourceGroupName, String workspaceName); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listNotebookKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * List keys of a notebook. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ListNotebookKeysResult listNotebookKeys(String resourceGroupName, String workspaceName); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link Response}. - */ - Response listOutboundNetworkDependenciesEndpointsWithResponse( - String resourceGroupName, String workspaceName, Context context); - - /** - * Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName Name of Azure Machine Learning workspace. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. - */ - ExternalFqdnResponse listOutboundNetworkDependenciesEndpoints(String resourceGroupName, String workspaceName); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. - */ - Workspace getById(String id); - - /** - * Gets the properties of the specified machine learning workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of the specified machine learning workspace along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a machine learning workspace. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteById(String id); - - /** - * Deletes a machine learning workspace. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 2577043eada6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/models/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the data models for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure - * Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning.models; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java deleted file mode 100644 index a318a1e7d76b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/com/azure/resourcemanager/machinelearning/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the classes for AzureMachineLearningWorkspaces. These APIs allow end users to operate on Azure - * Machine Learning Workspace resources. - */ -package com.azure.resourcemanager.machinelearning; diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/main/java/module-info.java deleted file mode 100644 index dd9aa25ecf83..000000000000 --- 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 fb21453d2644..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsCreateOrUpdateSamples.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.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -import com.azure.resourcemanager.machinelearning.models.BatchRetrySettings; -import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.io.IOException; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BatchDeployments CreateOrUpdate. */ -public final class BatchDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 BatchDeploymentProperties() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").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 DeploymentResourceConfiguration() - .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 7b39c6096d2c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for BatchDeployments Delete. */ -public final class BatchDeploymentsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java deleted file mode 100644 index c1b47f7e527f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for BatchDeployments Get. */ -public final class BatchDeploymentsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.java deleted file mode 100644 index b5fff0eb963b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsListSamples.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; - -/** Samples for BatchDeployments List. */ -public final class BatchDeploymentsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java deleted file mode 100644 index 847ffdcac6c7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.BatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BatchDeployments Update. */ -public final class BatchDeploymentsUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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) { - BatchDeployment resource = - manager - .batchDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withProperties(new PartialBatchDeployment().withDescription("string")) - .apply(); - } - - @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 456f30a703be..000000000000 --- 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.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BatchEndpoints CreateOrUpdate. */ -public final class BatchEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 BatchEndpointProperties() - .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 6456c727fcc4..000000000000 --- 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; - -/** Samples for BatchEndpoints Delete. */ -public final class BatchEndpointsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsGetSamples.java deleted file mode 100644 index 9daf7b13cfee..000000000000 --- 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; - -/** Samples for BatchEndpoints Get. */ -public final class BatchEndpointsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListKeysSamples.java deleted file mode 100644 index 5d0685fd7310..000000000000 --- 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; - -/** Samples for BatchEndpoints ListKeys. */ -public final class BatchEndpointsListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java deleted file mode 100644 index 6ab315093f3d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for BatchEndpoints List. */ -public final class BatchEndpointsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.java deleted file mode 100644 index 4a7fd23152fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.BatchEndpoint; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BatchEndpoints Update. */ -public final class BatchEndpointsUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 { - BatchEndpoint resource = - manager - .batchEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); - } - - @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 99ad6bdb20be..000000000000 --- 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.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for CodeContainers CreateOrUpdate. */ -public final class CodeContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 CodeContainerProperties() - .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 f1db0a949fa4..000000000000 --- 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; - -/** Samples for CodeContainers Delete. */ -public final class CodeContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetSamples.java deleted file mode 100644 index 8bc80b6fe906..000000000000 --- 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; - -/** Samples for CodeContainers Get. */ -public final class CodeContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java deleted file mode 100644 index fd3cd97cad52..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for CodeContainers List. */ -public final class CodeContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 92534796defa..000000000000 --- 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.CodeVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for CodeVersions CreateOrUpdate. */ -public final class CodeVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 CodeVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withCodeUri("fakeTokenPlaceholder")) - .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 d933ba22b21a..000000000000 --- 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; - -/** Samples for CodeVersions Delete. */ -public final class CodeVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsGetSamples.java deleted file mode 100644 index 61640e5ec45f..000000000000 --- 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; - -/** Samples for CodeVersions Get. */ -public final class CodeVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsListSamples.java deleted file mode 100644 index 779bbf653004..000000000000 --- 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; - -/** Samples for CodeVersions List. */ -public final class CodeVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateSamples.java deleted file mode 100644 index cef6af5f93a3..000000000000 --- 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.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ComponentContainers CreateOrUpdate. */ -public final class ComponentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 ComponentContainerProperties() - .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 c6b1f5030584..000000000000 --- 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; - -/** Samples for ComponentContainers Delete. */ -public final class ComponentContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetSamples.java deleted file mode 100644 index a3370c8ca451..000000000000 --- 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; - -/** Samples for ComponentContainers Get. */ -public final class ComponentContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java deleted file mode 100644 index bd2af0671ad3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for ComponentContainers List. */ -public final class ComponentContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index dfb4e061dd7d..000000000000 --- 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.ComponentVersionProperties; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ComponentVersions CreateOrUpdate. */ -public final class ComponentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 ComponentVersionProperties() - .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 d20b0d247f32..000000000000 --- 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; - -/** Samples for ComponentVersions Delete. */ -public final class ComponentVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetSamples.java deleted file mode 100644 index fde41af2e305..000000000000 --- 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; - -/** Samples for ComponentVersions Get. */ -public final class ComponentVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.java deleted file mode 100644 index 19a8b1a2ac81..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListSamples.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; - -/** Samples for ComponentVersions List. */ -public final class ComponentVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java deleted file mode 100644 index 943186937135..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeCreateOrUpdateSamples.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.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/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAKSCompute.json - */ - /** - * Sample code: Create an AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new Aks()) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AKSCompute.json - */ - /** - * Sample code: Update an AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateAnAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Aks() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties(new AksSchemaProperties().withAgentCount(4))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/KubernetesCompute.json - */ - /** - * Sample code: Attach a Kubernetes Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void attachAKubernetesCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new Kubernetes() - .withDescription("some compute") - .withResourceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2") - .withProperties( - new KubernetesProperties() - .withNamespace("default") - .withDefaultInstanceType("defaultInstanceType") - .withInstanceTypes( - mapOf( - "defaultInstanceType", - new InstanceTypeSchema() - .withResources( - new InstanceTypeSchemaResources() - .withRequests( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null)) - .withLimits( - mapOf("cpu", "1", "memory", "4Gi", "nvidia.com/gpu", null))))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceWithSchedules.json - */ - /** - * Sample code: Create an ComputeInstance Compute with Schedules. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceComputeWithSchedules( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicAmlCompute.json - */ - /** - * Sample code: Create a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withProperties( - new AmlComputeProperties() - .withOsType(OsType.WINDOWS) - .withVmSize("STANDARD_NC6") - .withVmPriority(VmPriority.DEDICATED) - .withVirtualMachineImage( - new VirtualMachineImage() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1")) - .withIsolatedNetwork(false) - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(1) - .withMinNodeCount(0) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))) - .withRemoteLoginPortPublicAccess(RemoteLoginPortPublicAccess.NOT_SPECIFIED) - .withEnableNodePublicIp(true))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstance.json - */ - /** - * Sample code: Create an ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance() - .withProperties( - new ComputeInstanceProperties() - .withVmSize("STANDARD_NC6") - .withSubnet(new ResourceId().withId("test-subnet-resource-id")) - .withApplicationSharingPolicy(ApplicationSharingPolicy.PERSONAL) - .withSshSettings( - new ComputeInstanceSshSettings().withSshPublicAccess(SshPublicAccess.DISABLED)) - .withComputeInstanceAuthorizationType(ComputeInstanceAuthorizationType.PERSONAL) - .withPersonalComputeInstanceSettings( - new PersonalComputeInstanceSettings() - .withAssignedUser( - new AssignedUser() - .withObjectId("00000000-0000-0000-0000-000000000000") - .withTenantId("00000000-0000-0000-0000-000000000000"))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/ComputeInstanceMinimal.json - */ - /** - * Sample code: Create an ComputeInstance Compute with minimal inputs. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createAnComputeInstanceComputeWithMinimalInputs( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new ComputeInstance().withProperties(new ComputeInstanceProperties().withVmSize("STANDARD_NC6"))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/AmlCompute.json - */ - /** - * Sample code: Update a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties( - new AmlCompute() - .withDescription("some compute") - .withProperties( - new AmlComputeProperties() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M"))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/createOrUpdate/BasicDataFactoryCompute.json - */ - /** - * Sample code: Create a DataFactory Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createADataFactoryCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .define("compute123") - .withExistingWorkspace("testrg123", "workspaces123") - .withRegion("eastus") - .withProperties(new DataFactory()) - .create(); - } - - @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 ee6c38e168ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeDeleteSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; - -/** Samples for Compute Delete. */ -public final class ComputeDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/delete.json - */ - /** - * Sample code: Delete Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .delete( - "testrg123", - "workspaces123", - "compute123", - UnderlyingResourceAction.DELETE, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java deleted file mode 100644 index eeb1c6dfefd9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeGetSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute Get. */ -public final class ComputeGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AKSCompute.json - */ - /** - * Sample code: Get a AKS Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAAKSCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/KubernetesCompute.json - */ - /** - * Sample code: Get a Kubernetes Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAKubernetesCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/ComputeInstance.json - */ - /** - * Sample code: Get an ComputeInstance. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAnComputeInstance(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/get/AmlCompute.json - */ - /** - * Sample code: Get a AML Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAAMLCompute(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListKeysSamples.java deleted file mode 100644 index 2591bf4e8cf7..000000000000 --- 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; - -/** Samples for Compute ListKeys. */ -public final class ComputeListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listKeys.json - */ - /** - * Sample code: List AKS Compute Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listAKSComputeKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .computes() - .listKeysWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java deleted file mode 100644 index 6a76b986c2c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListNodesSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute ListNodes. */ -public final class ComputeListNodesSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/listNodes.json - */ - /** - * Sample code: Get compute nodes information for a compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComputeNodesInformationForACompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().listNodes("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java deleted file mode 100644 index 76569fd48bfb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute List. */ -public final class ComputeListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/list.json - */ - /** - * Sample code: Get Computes. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getComputes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().list("testrg123", "workspaces123", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java deleted file mode 100644 index f4e3d4904b1c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeRestartSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute Restart. */ -public final class ComputeRestartSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/restart.json - */ - /** - * Sample code: Restart ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void restartComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().restart("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java deleted file mode 100644 index a27b9dd8f911..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute Start. */ -public final class ComputeStartSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/start.json - */ - /** - * Sample code: Start ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void startComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().start("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java deleted file mode 100644 index 9b9d0be34a8c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeStopSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Compute Stop. */ -public final class ComputeStopSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/stop.json - */ - /** - * Sample code: Stop ComputeInstance Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void stopComputeInstanceCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.computes().stop("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.java deleted file mode 100644 index 6ae1b51588f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ComputeUpdateSamples.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.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; - -/** Samples for Compute Update. */ -public final class ComputeUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Compute/patch.json - */ - /** - * Sample code: Update a AmlCompute Compute. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateAAmlComputeCompute( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - ComputeResource resource = - manager - .computes() - .getWithResponse("testrg123", "workspaces123", "compute123", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withProperties( - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(4) - .withMinNodeCount(4) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT5M")))) - .apply(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateSamples.java deleted file mode 100644 index 470d585fbac7..000000000000 --- 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.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; - -/** Samples for DataContainers CreateOrUpdate. */ -public final class DataContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 DataContainerProperties() - .withDescription("string") - .withProperties(mapOf("properties1", "value1", "properties2", "value2")) - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withDataType(DataType.fromString("UriFile"))) - .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 43273b2c9c5b..000000000000 --- 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; - -/** Samples for DataContainers Delete. */ -public final class DataContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetSamples.java deleted file mode 100644 index 43692b7b234f..000000000000 --- 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; - -/** Samples for DataContainers Get. */ -public final class DataContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java deleted file mode 100644 index 497053036fa3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for DataContainers List. */ -public final class DataContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateSamples.java deleted file mode 100644 index d90fcdc2db26..000000000000 --- 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/stable/2022-10-01/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 79c9624287da..000000000000 --- 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; - -/** Samples for DataVersions Delete. */ -public final class DataVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetSamples.java deleted file mode 100644 index c0ed4ee30644..000000000000 --- 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; - -/** Samples for DataVersions Get. */ -public final class DataVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java deleted file mode 100644 index 62ce47598970..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for DataVersions List. */ -public final class DataVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.java deleted file mode 100644 index 1ec4a1f1c4ea..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresCreateOrUpdateSamples.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.generated; - -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.AccountKeyDatastoreSecrets; -import com.azure.resourcemanager.machinelearning.models.AzureBlobDatastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen1Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureDataLakeGen2Datastore; -import com.azure.resourcemanager.machinelearning.models.AzureFileDatastore; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreCredentials; -import com.azure.resourcemanager.machinelearning.models.ServicePrincipalDatastoreSecrets; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -/** Samples for Datastores CreateOrUpdate. */ -public final class DatastoresCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen1WServicePrincipal/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureDataLakeGen1Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .withTenantId(UUID.fromString("00000000-1111-2222-3333-444444444444"))) - .withStoreName("string")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureDataLakeGen2WServicePrincipal/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureDataLakeGen2Datastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new ServicePrincipalDatastoreCredentials() - .withAuthorityUrl("string") - .withClientId(UUID.fromString("00000000-1111-2222-3333-444444444444")) - .withResourceUrl("string") - .withSecrets( - new ServicePrincipalDatastoreSecrets().withClientSecret("fakeTokenPlaceholder")) - .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/stable/2022-10-01/examples/Datastore/AzureBlobWAccountKey/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (AzureBlob w/ AccountKey). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureBlobWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureBlobDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .withContainerName("string") - .withEndpoint("core.windows.net") - .withProtocol("https")) - .withSkipValidation(false) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/AzureFileWAccountKey/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate datastore (Azure File store w/ AccountKey). - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateDatastoreAzureFileStoreWAccountKey( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AzureFileDatastore() - .withDescription("string") - .withTags(mapOf("string", "string")) - .withCredentials( - new AccountKeyDatastoreCredentials() - .withSecrets(new AccountKeyDatastoreSecrets().withKey("fakeTokenPlaceholder"))) - .withAccountName("string") - .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 74ee3e5e7905..000000000000 --- 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; - -/** Samples for Datastores Delete. */ -public final class DatastoresDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/delete.json - */ - /** - * Sample code: Delete datastore. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .deleteWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java deleted file mode 100644 index 8bd81700eff5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Datastores Get. */ -public final class DatastoresGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/get.json - */ - /** - * Sample code: Get datastore. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDatastore(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.datastores().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.java deleted file mode 100644 index 6f768bffac33..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSamples.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 java.util.Arrays; - -/** Samples for Datastores List. */ -public final class DatastoresListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/list.json - */ - /** - * Sample code: List datastores. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listDatastores(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .list( - "test-rg", - "my-aml-workspace", - null, - 1, - false, - Arrays.asList("string"), - "string", - "string", - false, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/DatastoresListSecretsSamples.java deleted file mode 100644 index 4e9a8c6857a5..000000000000 --- 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; - -/** Samples for Datastores ListSecrets. */ -public final class DatastoresListSecretsSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Datastore/listSecrets.json - */ - /** - * Sample code: Get datastore secrets. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getDatastoreSecrets(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .datastores() - .listSecretsWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateSamples.java deleted file mode 100644 index 09f24071f65e..000000000000 --- 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.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for EnvironmentContainers CreateOrUpdate. */ -public final class EnvironmentContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 EnvironmentContainerProperties() - .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 62f26c6e966f..000000000000 --- 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; - -/** Samples for EnvironmentContainers Delete. */ -public final class EnvironmentContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetSamples.java deleted file mode 100644 index 4fa48edf026f..000000000000 --- 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; - -/** Samples for EnvironmentContainers Get. */ -public final class EnvironmentContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListSamples.java deleted file mode 100644 index 85a7bf57bd45..000000000000 --- 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; - -/** Samples for EnvironmentContainers List. */ -public final class EnvironmentContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateSamples.java deleted file mode 100644 index a8c7e309af90..000000000000 --- 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.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; - -/** Samples for EnvironmentVersions CreateOrUpdate. */ -public final class EnvironmentVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 EnvironmentVersionProperties() - .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 972e72140e30..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteSamples.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; - -/** Samples for EnvironmentVersions Delete. */ -public final class EnvironmentVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetSamples.java deleted file mode 100644 index 04673d4e041d..000000000000 --- 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; - -/** Samples for EnvironmentVersions Get. */ -public final class EnvironmentVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.java deleted file mode 100644 index 9aa3338d518f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListSamples.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; - -/** Samples for EnvironmentVersions List. */ -public final class EnvironmentVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java deleted file mode 100644 index 3022117eaeaa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Jobs Cancel. */ -public final class JobsCancelSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/cancel.json - */ - /** - * Sample code: Cancel Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void cancelJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().cancel("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java deleted file mode 100644 index 394e954bdf1d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateSamples.java +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.AmlToken; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.CommandJob; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import com.azure.resourcemanager.machinelearning.models.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.SweepJob; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import com.azure.resourcemanager.machinelearning.models.TrialComponent; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import java.io.IOException; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Jobs CreateOrUpdate. */ -public final class JobsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new AutoMLJob() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withComputeId("string") - .withDisplayName("string") - .withExperimentName("string") - .withIdentity(new AmlToken()) - .withIsArchived(false) - .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 JobResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9bec0ab0-c62f-4fa9-a97c-7b24bbcc90ad\":null}", - Object.class, - SerializerEncoding.JSON)))) - .withTaskDetails( - new ImageClassification() - .withTargetColumnName("string") - .withTrainingData(new MLTableJobInput().withUri("string")) - .withModelSettings(new ImageModelSettingsClassification().withValidationCropSize(2)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withValidationCropSize("choice(2, 360)"))) - .withLimitSettings(new ImageLimitSettings().withMaxTrials(2)))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new SweepJob() - .withDescription("string") - .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("fakeTokenPlaceholder") - .withCommand("string") - .withDistribution(new Mpi().withProcessCountPerInstance(1)) - .withEnvironmentId("string") - .withEnvironmentVariables(mapOf("string", "string")) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(1) - .withInstanceType("string") - .withProperties( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"e6b6493e-7d5e-4db3-be1e-306ec641327e\":null}", - Object.class, - SerializerEncoding.JSON)))))) - .create(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdatePipelineJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new PipelineJob() - .withDescription("string") - .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/stable/2022-10-01/examples/Job/CommandJob/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateCommandJob( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) throws IOException { - manager - .jobs() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new CommandJob() - .withDescription("string") - .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("fakeTokenPlaceholder") - .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 JobResourceConfiguration() - .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 8634125dda6d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Jobs Delete. */ -public final class JobsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/delete.json - */ - /** - * Sample code: Delete Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.java deleted file mode 100644 index de450689ce60..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsGetSamples.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; - -/** Samples for Jobs Get. */ -public final class JobsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/get.json - */ - /** - * Sample code: Get Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/get.json - */ - /** - * Sample code: Get AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/get.json - */ - /** - * Sample code: Get Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/get.json - */ - /** - * Sample code: Get Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java deleted file mode 100644 index a5e1fdc1b6c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/JobsListSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Jobs List. */ -public final class JobsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/CommandJob/list.json - */ - /** - * Sample code: List Command Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listCommandJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/PipelineJob/list.json - */ - /** - * Sample code: List Pipeline Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listPipelineJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/SweepJob/list.json - */ - /** - * Sample code: List Sweep Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listSweepJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .jobs() - .list("test-rg", "my-aml-workspace", null, "string", "string", null, com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Job/AutoMLJob/list.json - */ - /** - * Sample code: List AutoML Job. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listAutoMLJob(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.jobs().list("test-rg", "my-aml-workspace", null, null, null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateSamples.java deleted file mode 100644 index 677398e18bd2..000000000000 --- 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.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ModelContainers CreateOrUpdate. */ -public final class ModelContainersCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 ModelContainerProperties() - .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 886e7ad2633d..000000000000 --- 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; - -/** Samples for ModelContainers Delete. */ -public final class ModelContainersDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetSamples.java deleted file mode 100644 index d67345357406..000000000000 --- 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; - -/** Samples for ModelContainers Get. */ -public final class ModelContainersGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java deleted file mode 100644 index c093dc594bcb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for ModelContainers List. */ -public final class ModelContainersListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java deleted file mode 100644 index 878dfda340fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; - -/** Samples for ModelVersions CreateOrUpdate. */ -public final class ModelVersionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 ModelVersionProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withIsAnonymous(false) - .withFlavors(mapOf("string", new FlavorData().withData(mapOf("string", "string")))) - .withModelType("CustomModel") - .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 a47b4bf44029..000000000000 --- 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; - -/** Samples for ModelVersions Delete. */ -public final class ModelVersionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetSamples.java deleted file mode 100644 index 6b3472f7fce9..000000000000 --- 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; - -/** Samples for ModelVersions Get. */ -public final class ModelVersionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.java deleted file mode 100644 index f5dffaa0e793..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListSamples.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; - -/** Samples for ModelVersions List. */ -public final class ModelVersionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.java deleted file mode 100644 index 3043d9ccc18f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsCreateOrUpdateSamples.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.generated; - -import com.azure.resourcemanager.machinelearning.models.CodeConfiguration; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; -import com.azure.resourcemanager.machinelearning.models.KubernetesOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedOnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.time.Duration; -import java.util.HashMap; -import java.util.Map; - -/** Samples for OnlineDeployments CreateOrUpdate. */ -public final class OnlineDeploymentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new KubernetesOnlineDeployment() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").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/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .define("testDeploymentName") - .withRegion("string") - .withExistingOnlineEndpoint("test-rg", "my-aml-workspace", "testEndpointName") - .withProperties( - new ManagedOnlineDeployment() - .withCodeConfiguration( - new CodeConfiguration().withCodeId("fakeTokenPlaceholder").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 b55caae86686..000000000000 --- 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; - -/** Samples for OnlineDeployments Delete. */ -public final class OnlineDeploymentsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.java deleted file mode 100644 index 52bb9772696f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsSamples.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.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; - -/** Samples for OnlineDeployments GetLogs. */ -public final class OnlineDeploymentsGetLogsSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/getLogs.json - */ - /** - * Sample code: Get Online Deployment Logs. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getOnlineDeploymentLogs( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .getLogsWithResponse( - "testrg123", - "workspace123", - "testEndpoint", - "testDeployment", - new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(0), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java deleted file mode 100644 index 1f3ce3be094e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetSamples.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for OnlineDeployments Get. */ -public final class OnlineDeploymentsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/get.json - */ - /** - * Sample code: Get Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/get.json - */ - /** - * Sample code: Get Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.java deleted file mode 100644 index 10373db08f21..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSamples.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; - -/** Samples for OnlineDeployments List. */ -public final class OnlineDeploymentsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/list.json - */ - /** - * Sample code: List Online Deployments. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOnlineDeployments(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .list( - "test-rg", "my-aml-workspace", "testEndpointName", "string", 1, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java deleted file mode 100644 index bf0872286248..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for OnlineDeployments ListSkus. */ -public final class OnlineDeploymentsListSkusSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/listSkus.json - */ - /** - * Sample code: List Managed Online Deployment Skus. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listManagedOnlineDeploymentSkus( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .listSkus( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - 1, - null, - com.azure.core.util.Context.NONE); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/listSkus.json - */ - /** - * Sample code: List Kubernetes Online Deployment Skus. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listKubernetesOnlineDeploymentSkus( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .onlineDeployments() - .listSkus( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - 1, - null, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.java deleted file mode 100644 index 45cf7405cce1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsUpdateSamples.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.OnlineDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; - -/** Samples for OnlineDeployments Update. */ -public final class OnlineDeploymentsUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/ManagedOnlineDeployment/update.json - */ - /** - * Sample code: Update Managed Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateManagedOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku( - new PartialSku() - .withCapacity(1) - .withFamily("string") - .withName("string") - .withSize("string") - .withTier(SkuTier.FREE)) - .apply(); - } - - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/OnlineDeployment/KubernetesOnlineDeployment/update.json - */ - /** - * Sample code: Update Kubernetes Online Deployment. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateKubernetesOnlineDeployment( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - OnlineDeployment resource = - manager - .onlineDeployments() - .getWithResponse( - "test-rg", - "my-aml-workspace", - "testEndpointName", - "testDeploymentName", - com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku( - new PartialSku() - .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 c5a7830b8a28..000000000000 --- 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.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; - -/** Samples for OnlineEndpoints CreateOrUpdate. */ -public final class OnlineEndpointsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 OnlineEndpointProperties() - .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 e5728f1084b1..000000000000 --- 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; - -/** Samples for OnlineEndpoints Delete. */ -public final class OnlineEndpointsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetSamples.java deleted file mode 100644 index 7bb869bf92cb..000000000000 --- 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; - -/** Samples for OnlineEndpoints Get. */ -public final class OnlineEndpointsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsGetTokenSamples.java deleted file mode 100644 index 0bddb517bc73..000000000000 --- 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; - -/** Samples for OnlineEndpoints GetToken. */ -public final class OnlineEndpointsGetTokenSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListKeysSamples.java deleted file mode 100644 index 6ec08e5fd2fd..000000000000 --- 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; - -/** Samples for OnlineEndpoints ListKeys. */ -public final class OnlineEndpointsListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java deleted file mode 100644 index 93ac7f0262cd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsListSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EndpointComputeType; -import com.azure.resourcemanager.machinelearning.models.OrderString; - -/** Samples for OnlineEndpoints List. */ -public final class OnlineEndpointsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java deleted file mode 100644 index 9055f46d6d28..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsRegenerateKeysSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.KeyType; -import com.azure.resourcemanager.machinelearning.models.RegenerateEndpointKeysRequest; - -/** Samples for OnlineEndpoints RegenerateKeys. */ -public final class OnlineEndpointsRegenerateKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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("fakeTokenPlaceholder"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.java deleted file mode 100644 index 617aea5a21eb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsUpdateSamples.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.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpoint; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** Samples for OnlineEndpoints Update. */ -public final class OnlineEndpointsUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/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 { - OnlineEndpoint resource = - manager - .onlineEndpoints() - .getWithResponse("test-rg", "my-aml-workspace", "testEndpointName", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "string", - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON)))) - .apply(); - } - - @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 ed6fb8689f40..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/OperationsListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/operationsList.json - */ - /** - * Sample code: OperationsList. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void operationsList(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.operations().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateSamples.java deleted file mode 100644 index d694e37a8e51..000000000000 --- 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/stable/2022-10-01/examples/PrivateEndpointConnection/createOrUpdate.json - */ - /** - * Sample code: WorkspacePutPrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspacePutPrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .privateEndpointConnections() - .define("{privateEndpointConnectionName}") - .withExistingWorkspace("rg-1234", "testworkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("Auto-Approved")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index b51239dd78d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/delete.json - */ - /** - * Sample code: WorkspaceDeletePrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspaceDeletePrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .privateEndpointConnections() - .deleteWithResponse( - "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index fae483260cc0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/get.json - */ - /** - * Sample code: WorkspaceGetPrivateEndpointConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspaceGetPrivateEndpointConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "rg-1234", "testworkspace", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index b815609fb93b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateEndpointConnection/list.json - */ - /** - * Sample code: StorageAccountListPrivateEndpointConnections. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void storageAccountListPrivateEndpointConnections( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateEndpointConnections().list("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 5f7ca342d38f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/PrivateLinkResource/list.json - */ - /** - * Sample code: WorkspaceListPrivateLinkResources. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void workspaceListPrivateLinkResources( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.privateLinkResources().listWithResponse("rg-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java deleted file mode 100644 index da38aefba064..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Quotas List. */ -public final class QuotasListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/list.json - */ - /** - * Sample code: List workspace quotas by VMFamily. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceQuotasByVMFamily( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.quotas().list("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.java deleted file mode 100644 index 7a5911910cf1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateSamples.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.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; - -/** Samples for Quotas Update. */ -public final class QuotasUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Quota/update.json - */ - /** - * Sample code: update quotas. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateQuotas(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .quotas() - .updateWithResponse( - "eastus", - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace1/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(100L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.MachineLearningServices/workspaces/demo_workspace2/quotas/Standard_DSv2_Family_Cluster_Dedicated_vCPUs") - .withType("Microsoft.MachineLearningServices/workspaces/quotas") - .withLimit(200L) - .withUnit(QuotaUnit.COUNT))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java deleted file mode 100644 index f58b680aaf5b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Schedules CreateOrUpdate. */ -public final class SchedulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/createOrUpdate.json - */ - /** - * Sample code: CreateOrUpdate Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createOrUpdateSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) - throws IOException { - manager - .schedules() - .define("string") - .withExistingWorkspace("test-rg", "my-aml-workspace") - .withProperties( - new ScheduleProperties() - .withDescription("string") - .withProperties(mapOf("string", "string")) - .withTags(mapOf("string", "string")) - .withAction( - new EndpointScheduleAction() - .withEndpointInvocationDefinition( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"9965593e-526f-4b89-bb36-761138cf2794\":null}", - Object.class, - SerializerEncoding.JSON))) - .withDisplayName("string") - .withIsEnabled(false) - .withTrigger( - new CronTrigger() - .withEndTime("string") - .withStartTime("string") - .withTimeZone("string") - .withExpression("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/SchedulesDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java deleted file mode 100644 index 8425d2bdae80..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Schedules Delete. */ -public final class SchedulesDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/delete.json - */ - /** - * Sample code: Delete Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().delete("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java deleted file mode 100644 index ed4851ee6751..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Schedules Get. */ -public final class SchedulesGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/get.json - */ - /** - * Sample code: Get Schedule. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getSchedule(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().getWithResponse("test-rg", "my-aml-workspace", "string", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java deleted file mode 100644 index a73377880c36..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Schedules List. */ -public final class SchedulesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Schedule/list.json - */ - /** - * Sample code: List Schedules. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listSchedules(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.schedules().list("test-rg", "my-aml-workspace", null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java deleted file mode 100644 index 610f0219a60a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/UsagesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Usages List. */ -public final class UsagesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Usage/list.json - */ - /** - * Sample code: List Usages. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listUsages(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.usages().list("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java deleted file mode 100644 index bd3b35c93152..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for VirtualMachineSizes List. */ -public final class VirtualMachineSizesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/VirtualMachineSize/list.json - */ - /** - * Sample code: List VM Sizes. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listVMSizes(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.virtualMachineSizes().listWithResponse("eastus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.java deleted file mode 100644 index ee18b1460db3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateSamples.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.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; - -/** Samples for WorkspaceConnections Create. */ -public final class WorkspaceConnectionsCreateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/create.json - */ - /** - * Sample code: CreateWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .define("connection-1") - .withExistingWorkspace("resourceGroup-1", "workspace-1") - .withProperties( - new NoneAuthTypeWorkspaceConnectionProperties() - .withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("www.facebook.com")) - .create(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.java deleted file mode 100644 index 70584254ef26..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteSamples.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; - -/** Samples for WorkspaceConnections Delete. */ -public final class WorkspaceConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/delete.json - */ - /** - * Sample code: DeleteWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .deleteWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetSamples.java deleted file mode 100644 index c5c1c28e42fd..000000000000 --- 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; - -/** Samples for WorkspaceConnections Get. */ -public final class WorkspaceConnectionsGetSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/get.json - */ - /** - * Sample code: GetWorkspaceConnection. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspaceConnection( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .getWithResponse("resourceGroup-1", "workspace-1", "connection-1", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java deleted file mode 100644 index a555209830d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for WorkspaceConnections List. */ -public final class WorkspaceConnectionsListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceConnection/list.json - */ - /** - * Sample code: ListWorkspaceConnections. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceConnections( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaceConnections() - .list( - "resourceGroup-1", - "workspace-1", - "www.facebook.com", - "ContainerRegistry", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java deleted file mode 100644 index a2e9ec836c5d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for WorkspaceFeatures List. */ -public final class WorkspaceFeaturesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/WorkspaceFeature/list.json - */ - /** - * Sample code: List Workspace features. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceFeatures(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaceFeatures().list("myResourceGroup", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java deleted file mode 100644 index f4db9bbdf9ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesCreateOrUpdateSamples.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.EncryptionKeyVaultProperties; -import com.azure.resourcemanager.machinelearning.models.EncryptionProperty; -import com.azure.resourcemanager.machinelearning.models.EncryptionStatus; -import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces CreateOrUpdate. */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/create.json - */ - /** - * Sample code: Create Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void createWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .define("testworkspace") - .withExistingResourceGroup("workspace-1234") - .withRegion("eastus2euap") - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai", - new UserAssignedIdentity()))) - .withDescription("test description") - .withFriendlyName("HelloName") - .withKeyVault( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv") - .withApplicationInsights( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights") - .withContainerRegistry( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry") - .withStorageAccount( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount") - .withEncryption( - new EncryptionProperty() - .withStatus(EncryptionStatus.ENABLED) - .withIdentity( - new IdentityForCmk() - .withUserAssignedIdentity( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai")) - .withKeyVaultProperties( - new EncryptionKeyVaultProperties() - .withKeyVaultArmId("fakeTokenPlaceholder") - .withKeyIdentifier("fakeTokenPlaceholder") - .withIdentityClientId(""))) - .withHbiWorkspace(false) - .withSharedPrivateLinkResources( - Arrays - .asList( - new SharedPrivateLinkResource() - .withName("testdbresource") - .withPrivateLinkResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql") - .withGroupId("Sql") - .withRequestMessage("Please approve") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED))) - .create(); - } - - @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 c1fd156d125f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces Delete. */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/delete.json - */ - /** - * Sample code: Delete Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void deleteWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().delete("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java deleted file mode 100644 index 686192ecc6e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDiagnoseSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.resourcemanager.machinelearning.models.DiagnoseRequestProperties; -import com.azure.resourcemanager.machinelearning.models.DiagnoseWorkspaceParameters; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces Diagnose. */ -public final class WorkspacesDiagnoseSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/diagnose.json - */ - /** - * Sample code: Diagnose Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void diagnoseWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .diagnose( - "workspace-1234", - "testworkspace", - new DiagnoseWorkspaceParameters() - .withValue( - new DiagnoseRequestProperties() - .withUdr(mapOf()) - .withNsg(mapOf()) - .withResourceLock(mapOf()) - .withDnsResolution(mapOf()) - .withStorageAccount(mapOf()) - .withKeyVault(mapOf()) - .withContainerRegistry(mapOf()) - .withApplicationInsights(mapOf()) - .withOthers(mapOf())), - com.azure.core.util.Context.NONE); - } - - @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 179c4e8e29b0..000000000000 --- 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; - -/** Samples for Workspaces GetByResourceGroup. */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/get.json - */ - /** - * Sample code: Get Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java deleted file mode 100644 index 669be8f3e6d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListByResourceGroupSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces ListByResourceGroup. */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listByResourceGroup.json - */ - /** - * Sample code: Get Workspaces by Resource Group. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspacesByResourceGroup( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listByResourceGroup("workspace-1234", null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java deleted file mode 100644 index ccbe6102435a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListKeysSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces ListKeys. */ -public final class WorkspacesListKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().listKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookAccessTokenSamples.java deleted file mode 100644 index ef8427324993..000000000000 --- 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; - -/** Samples for Workspaces ListNotebookAccessToken. */ -public final class WorkspacesListNotebookAccessTokenSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listNotebookAccessToken.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookAccessTokenWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListNotebookKeysSamples.java deleted file mode 100644 index 3e287c705f69..000000000000 --- 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; - -/** Samples for Workspaces ListNotebookKeys. */ -public final class WorkspacesListNotebookKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/listKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listNotebookKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java deleted file mode 100644 index efa218684f9b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces ListOutboundNetworkDependenciesEndpoints. */ -public final class WorkspacesListOutboundNetworkDependenciesEndpointsSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/ExternalFQDN/get.json - */ - /** - * Sample code: ListOutboundNetworkDependenciesEndpoints. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listOutboundNetworkDependenciesEndpoints( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "workspace-1234", "testworkspace", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java deleted file mode 100644 index 75c206e34e8a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListSamples.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces List. */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listBySubscription.json - */ - /** - * Sample code: Get Workspaces by subscription. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void getWorkspacesBySubscription( - com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().list(null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListStorageAccountKeysSamples.java deleted file mode 100644 index 9394db609d6c..000000000000 --- 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; - -/** Samples for Workspaces ListStorageAccountKeys. */ -public final class WorkspacesListStorageAccountKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/listStorageAccountKeys.json - */ - /** - * Sample code: List Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void listWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager - .workspaces() - .listStorageAccountKeysWithResponse("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java deleted file mode 100644 index 127a903e671c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesPrepareNotebookSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces PrepareNotebook. */ -public final class WorkspacesPrepareNotebookSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Notebook/prepare.json - */ - /** - * Sample code: Prepare Notebook. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void prepareNotebook(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().prepareNotebook("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java deleted file mode 100644 index 6f3d88cf7473..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysSamples.java +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -/** Samples for Workspaces ResyncKeys. */ -public final class WorkspacesResyncKeysSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/resyncKeys.json - */ - /** - * Sample code: Resync Workspace Keys. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void resyncWorkspaceKeys(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - manager.workspaces().resyncKeys("testrg123", "workspaces123", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.java deleted file mode 100644 index 5eb660d26642..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/samples/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesUpdateSamples.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.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.Workspace; - -/** Samples for Workspaces Update. */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: specification/machinelearningservices/resource-manager/Microsoft.MachineLearningServices/stable/2022-10-01/examples/Workspace/update.json - */ - /** - * Sample code: Update Workspace. - * - * @param manager Entry point to MachineLearningManager. - */ - public static void updateWorkspace(com.azure.resourcemanager.machinelearning.MachineLearningManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("workspace-1234", "testworkspace", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withDescription("new description") - .withFriendlyName("New friendly name") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .apply(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java deleted file mode 100644 index c7c3e2424e74..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AksNetworkingConfigurationTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AksNetworkingConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AksNetworkingConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AksNetworkingConfiguration model = - BinaryData - .fromString( - "{\"subnetId\":\"pilguooqjag\",\"serviceCidr\":\"itgueiookjbs\",\"dnsServiceIP\":\"rtdtpdelq\",\"dockerBridgeCidr\":\"slmot\"}") - .toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("pilguooqjag", model.subnetId()); - Assertions.assertEquals("itgueiookjbs", model.serviceCidr()); - Assertions.assertEquals("rtdtpdelq", model.dnsServiceIp()); - Assertions.assertEquals("slmot", model.dockerBridgeCidr()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AksNetworkingConfiguration model = - new AksNetworkingConfiguration() - .withSubnetId("pilguooqjag") - .withServiceCidr("itgueiookjbs") - .withDnsServiceIp("rtdtpdelq") - .withDockerBridgeCidr("slmot"); - model = BinaryData.fromObject(model).toObject(AksNetworkingConfiguration.class); - Assertions.assertEquals("pilguooqjag", model.subnetId()); - Assertions.assertEquals("itgueiookjbs", model.serviceCidr()); - Assertions.assertEquals("rtdtpdelq", model.dnsServiceIp()); - Assertions.assertEquals("slmot", model.dockerBridgeCidr()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java deleted file mode 100644 index 382335e46a8b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodeInformationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; - -public final class AmlComputeNodeInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodeInformation model = - BinaryData - .fromString( - "{\"nodeId\":\"hsmtxpsiebtfhvp\",\"privateIpAddress\":\"apskrdqm\",\"publicIpAddress\":\"jdhtldwkyzxu\",\"port\":379697539,\"nodeState\":\"unusable\",\"runId\":\"scwsv\"}") - .toObject(AmlComputeNodeInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodeInformation model = new AmlComputeNodeInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodeInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java deleted file mode 100644 index bdb79d003a02..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlComputeNodesInformationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodesInformation; - -public final class AmlComputeNodesInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlComputeNodesInformation model = - BinaryData - .fromString( - "{\"nodes\":[{\"nodeId\":\"zjancuxr\",\"privateIpAddress\":\"wbavxbniwdj\",\"publicIpAddress\":\"zt\",\"port\":593552862,\"nodeState\":\"unusable\",\"runId\":\"xytxhpzxbz\"},{\"nodeId\":\"zabglcuhxwt\",\"privateIpAddress\":\"yqiklbbovplwzb\",\"publicIpAddress\":\"gy\",\"port\":1408848677,\"nodeState\":\"idle\",\"runId\":\"mkfssxqukkfplgm\"},{\"nodeId\":\"xnkjzkdesl\",\"privateIpAddress\":\"lopwiyig\",\"publicIpAddress\":\"pkdwzbai\",\"port\":830727700,\"nodeState\":\"unusable\",\"runId\":\"m\"}],\"nextLink\":\"qupedeojnab\"}") - .toObject(AmlComputeNodesInformation.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlComputeNodesInformation model = new AmlComputeNodesInformation(); - model = BinaryData.fromObject(model).toObject(AmlComputeNodesInformation.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java deleted file mode 100644 index 4dd999feefe2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"gjofjd\",\"resource\":\"qs\",\"operation\":\"eupewnwreitjz\",\"description\":\"lusarh\"}") - .toObject(AmlOperationDisplay.class); - Assertions.assertEquals("gjofjd", model.provider()); - Assertions.assertEquals("qs", model.resource()); - Assertions.assertEquals("eupewnwreitjz", model.operation()); - Assertions.assertEquals("lusarh", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationDisplay model = - new AmlOperationDisplay() - .withProvider("gjofjd") - .withResource("qs") - .withOperation("eupewnwreitjz") - .withDescription("lusarh"); - model = BinaryData.fromObject(model).toObject(AmlOperationDisplay.class); - Assertions.assertEquals("gjofjd", model.provider()); - Assertions.assertEquals("qs", model.resource()); - Assertions.assertEquals("eupewnwreitjz", model.operation()); - Assertions.assertEquals("lusarh", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java deleted file mode 100644 index 225981974355..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationInner model = - BinaryData - .fromString( - "{\"name\":\"siznto\",\"display\":{\"provider\":\"a\",\"resource\":\"ajpsquc\",\"operation\":\"o\",\"description\":\"dkfo\"},\"isDataAction\":false}") - .toObject(AmlOperationInner.class); - Assertions.assertEquals("siznto", model.name()); - Assertions.assertEquals("a", model.display().provider()); - Assertions.assertEquals("ajpsquc", model.display().resource()); - Assertions.assertEquals("o", model.display().operation()); - Assertions.assertEquals("dkfo", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationInner model = - new AmlOperationInner() - .withName("siznto") - .withDisplay( - new AmlOperationDisplay() - .withProvider("a") - .withResource("ajpsquc") - .withOperation("o") - .withDescription("dkfo")) - .withIsDataAction(false); - model = BinaryData.fromObject(model).toObject(AmlOperationInner.class); - Assertions.assertEquals("siznto", model.name()); - Assertions.assertEquals("a", model.display().provider()); - Assertions.assertEquals("ajpsquc", model.display().resource()); - Assertions.assertEquals("o", model.display().operation()); - Assertions.assertEquals("dkfo", model.display().description()); - Assertions.assertEquals(false, model.isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.java deleted file mode 100644 index 5401da3f66c4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlOperationListResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlOperationInner; -import com.azure.resourcemanager.machinelearning.models.AmlOperationDisplay; -import com.azure.resourcemanager.machinelearning.models.AmlOperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AmlOperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlOperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"quvgjxpybczme\",\"display\":{\"provider\":\"zopbsphrupidgs\",\"resource\":\"bejhphoycmsxa\",\"operation\":\"hdxbmtqio\",\"description\":\"zehtbmu\"},\"isDataAction\":false},{\"name\":\"noi\",\"display\":{\"provider\":\"lrxybqsoq\",\"resource\":\"gkdmb\",\"operation\":\"zlobcufpd\",\"description\":\"rbt\"},\"isDataAction\":true},{\"name\":\"nq\",\"display\":{\"provider\":\"qgn\",\"resource\":\"ooojywifsqe\",\"operation\":\"agdfmglzlh\",\"description\":\"rifkwm\"},\"isDataAction\":true}]}") - .toObject(AmlOperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlOperationListResult model = - new AmlOperationListResult() - .withValue( - Arrays - .asList( - new AmlOperationInner() - .withName("quvgjxpybczme") - .withDisplay( - new AmlOperationDisplay() - .withProvider("zopbsphrupidgs") - .withResource("bejhphoycmsxa") - .withOperation("hdxbmtqio") - .withDescription("zehtbmu")) - .withIsDataAction(false), - new AmlOperationInner() - .withName("noi") - .withDisplay( - new AmlOperationDisplay() - .withProvider("lrxybqsoq") - .withResource("gkdmb") - .withOperation("zlobcufpd") - .withDescription("rbt")) - .withIsDataAction(true), - new AmlOperationInner() - .withName("nq") - .withDisplay( - new AmlOperationDisplay() - .withProvider("qgn") - .withResource("ooojywifsqe") - .withOperation("agdfmglzlh") - .withDescription("rifkwm")) - .withIsDataAction(true))); - model = BinaryData.fromObject(model).toObject(AmlOperationListResult.class); - Assertions.assertEquals("quvgjxpybczme", model.value().get(0).name()); - Assertions.assertEquals("zopbsphrupidgs", model.value().get(0).display().provider()); - Assertions.assertEquals("bejhphoycmsxa", model.value().get(0).display().resource()); - Assertions.assertEquals("hdxbmtqio", model.value().get(0).display().operation()); - Assertions.assertEquals("zehtbmu", model.value().get(0).display().description()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java deleted file mode 100644 index 4500fbd74409..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlTokenTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AmlToken; - -public final class AmlTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlToken model = BinaryData.fromString("{\"identityType\":\"AMLToken\"}").toObject(AmlToken.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlToken model = new AmlToken(); - model = BinaryData.fromObject(model).toObject(AmlToken.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java deleted file mode 100644 index acef398e64af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AmlUserFeatureInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.AmlUserFeatureInner; -import org.junit.jupiter.api.Assertions; - -public final class AmlUserFeatureInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AmlUserFeatureInner model = - BinaryData - .fromString("{\"id\":\"pkt\",\"displayName\":\"ylkmqp\",\"description\":\"yhlfb\"}") - .toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("pkt", model.id()); - Assertions.assertEquals("ylkmqp", model.displayName()); - Assertions.assertEquals("yhlfb", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AmlUserFeatureInner model = - new AmlUserFeatureInner().withId("pkt").withDisplayName("ylkmqp").withDescription("yhlfb"); - model = BinaryData.fromObject(model).toObject(AmlUserFeatureInner.class); - Assertions.assertEquals("pkt", model.id()); - Assertions.assertEquals("ylkmqp", model.displayName()); - Assertions.assertEquals("yhlfb", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java deleted file mode 100644 index bf7b889c21a8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetBaseTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetBase model = - BinaryData - .fromString( - "{\"isAnonymous\":false,\"isArchived\":false,\"description\":\"szfjvfbgofelja\",\"properties\":{\"ojnal\":\"mqhldvrii\",\"qhhahhxvrhmzkwpj\":\"hfkvtvsexsowuel\",\"ughftqsx\":\"wws\"},\"tags\":{\"grjguufzd\":\"ujxukndxd\",\"whbotzingamv\":\"syqtfi\"}}") - .toObject(AssetBase.class); - Assertions.assertEquals("szfjvfbgofelja", model.description()); - Assertions.assertEquals("mqhldvrii", model.properties().get("ojnal")); - Assertions.assertEquals("ujxukndxd", model.tags().get("grjguufzd")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetBase model = - new AssetBase() - .withDescription("szfjvfbgofelja") - .withProperties(mapOf("ojnal", "mqhldvrii", "qhhahhxvrhmzkwpj", "hfkvtvsexsowuel", "ughftqsx", "wws")) - .withTags(mapOf("grjguufzd", "ujxukndxd", "whbotzingamv", "syqtfi")) - .withIsAnonymous(false) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(AssetBase.class); - Assertions.assertEquals("szfjvfbgofelja", model.description()); - Assertions.assertEquals("mqhldvrii", model.properties().get("ojnal")); - Assertions.assertEquals("ujxukndxd", model.tags().get("grjguufzd")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java deleted file mode 100644 index 68efc629022b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetContainerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetContainer; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AssetContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetContainer model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"qnyhgb\",\"nextVersion\":\"tjivfxzsjabib\",\"description\":\"stawfsdjpvkv\",\"properties\":{\"budurgkakmo\":\"xbkzbzkdvncj\",\"gzrf\":\"zhjjklffhmouwq\",\"ikayuhqlbjbsybb\":\"eeyebi\"},\"tags\":{\"slthaq\":\"vtldgmfpgvmpip\"}}") - .toObject(AssetContainer.class); - Assertions.assertEquals("stawfsdjpvkv", model.description()); - Assertions.assertEquals("xbkzbzkdvncj", model.properties().get("budurgkakmo")); - Assertions.assertEquals("vtldgmfpgvmpip", model.tags().get("slthaq")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetContainer model = - new AssetContainer() - .withDescription("stawfsdjpvkv") - .withProperties( - mapOf("budurgkakmo", "xbkzbzkdvncj", "gzrf", "zhjjklffhmouwq", "ikayuhqlbjbsybb", "eeyebi")) - .withTags(mapOf("slthaq", "vtldgmfpgvmpip")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(AssetContainer.class); - Assertions.assertEquals("stawfsdjpvkv", model.description()); - Assertions.assertEquals("xbkzbzkdvncj", model.properties().get("budurgkakmo")); - Assertions.assertEquals("vtldgmfpgvmpip", model.tags().get("slthaq")); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java deleted file mode 100644 index b29a8197e2ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobInputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobInput model = - BinaryData.fromString("{\"mode\":\"ReadOnlyMount\",\"uri\":\"fgbrtt\"}").toObject(AssetJobInput.class); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("fgbrtt", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobInput model = new AssetJobInput().withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("fgbrtt"); - model = BinaryData.fromObject(model).toObject(AssetJobInput.class); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("fgbrtt", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java deleted file mode 100644 index 9b241f855a05..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetJobOutputTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class AssetJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetJobOutput model = - BinaryData.fromString("{\"mode\":\"Upload\",\"uri\":\"lkiexhajlfnthiq\"}").toObject(AssetJobOutput.class); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("lkiexhajlfnthiq", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetJobOutput model = new AssetJobOutput().withMode(OutputDeliveryMode.UPLOAD).withUri("lkiexhajlfnthiq"); - model = BinaryData.fromObject(model).toObject(AssetJobOutput.class); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("lkiexhajlfnthiq", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java deleted file mode 100644 index 11357aca4ae8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssetReferenceBaseTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssetReferenceBase; - -public final class AssetReferenceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssetReferenceBase model = - BinaryData.fromString("{\"referenceType\":\"AssetReferenceBase\"}").toObject(AssetReferenceBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssetReferenceBase model = new AssetReferenceBase(); - model = BinaryData.fromObject(model).toObject(AssetReferenceBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java deleted file mode 100644 index 0ee7c299110b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AssignedUserTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import org.junit.jupiter.api.Assertions; - -public final class AssignedUserTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AssignedUser model = - BinaryData - .fromString("{\"objectId\":\"mykyujxsglhs\",\"tenantId\":\"rryejylmbkzudnig\"}") - .toObject(AssignedUser.class); - Assertions.assertEquals("mykyujxsglhs", model.objectId()); - Assertions.assertEquals("rryejylmbkzudnig", model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AssignedUser model = new AssignedUser().withObjectId("mykyujxsglhs").withTenantId("rryejylmbkzudnig"); - model = BinaryData.fromObject(model).toObject(AssignedUser.class); - Assertions.assertEquals("mykyujxsglhs", model.objectId()); - Assertions.assertEquals("rryejylmbkzudnig", model.tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java deleted file mode 100644 index 44430f0e8225..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoForecastHorizonTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoForecastHorizon; - -public final class AutoForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoForecastHorizon model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoForecastHorizon model = new AutoForecastHorizon(); - model = BinaryData.fromObject(model).toObject(AutoForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.java deleted file mode 100644 index 789779d40100..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLJobTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLJob; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLJob model = - BinaryData - .fromString( - "{\"jobType\":\"AutoML\",\"environmentId\":\"uttdiygbp\",\"environmentVariables\":{\"ctwwgzw\":\"swmtxk\",\"og\":\"jlmec\"},\"outputs\":{\"zaifghtmoqqtlff\":{\"jobOutputType\":\"JobOutput\",\"description\":\"vne\"},\"avfqnvhnqoewdogi\":{\"jobOutputType\":\"JobOutput\",\"description\":\"bkrkjj\"},\"t\":{\"jobOutputType\":\"JobOutput\",\"description\":\"tesypvidbztjh\"},\"p\":{\"jobOutputType\":\"JobOutput\",\"description\":\"ovnynkbwetnju\"}},\"resources\":{\"dockerArgs\":\"kzyaup\",\"shmSize\":\"ccxnafbwqroohtuo\",\"instanceCount\":339434421,\"instanceType\":\"nur\",\"properties\":{\"ecmslclbl\":\"datamghihp\",\"bsjuscvsfx\":\"datajxl\",\"cydrtceukdqkk\":\"datagctmgxuupbezq\",\"chillcecf\":\"dataihztgeqmgqzgwldo\"}},\"taskDetails\":{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Debug\",\"targetColumnName\":\"aoaguhicqlli\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"ac\",\"description\":\"vhrweftkwqejpmv\"}},\"componentId\":\"ehaepwamcxtc\",\"computeId\":\"upeuknijduyye\",\"displayName\":\"ydjfb\",\"experimentName\":\"yv\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"xjcmmzrrsc\":{\"endpoint\":\"wikdmh\",\"errorMessage\":\"kuflgbh\",\"jobServiceType\":\"uacdixmxuf\",\"port\":2084049172,\"properties\":{\"kfnozoeoqbvj\":\"qg\",\"ay\":\"vefgwbmqjchntas\",\"wyvf\":\"xbulpzealbmqkyo\"},\"status\":\"btsuahxs\"},\"k\":{\"endpoint\":\"i\",\"errorMessage\":\"drnpxqwodiff\",\"jobServiceType\":\"cjrmmua\",\"port\":1056195369,\"properties\":{\"e\":\"jogjonmc\",\"akpoldtvevbo\":\"oyzbamwineofvf\",\"zjknyuxg\":\"lz\",\"mrdixtreki\":\"ttxpnrupza\"},\"status\":\"wyskbruffgll\"}},\"status\":\"Paused\",\"description\":\"lxhrp\",\"properties\":{\"iryr\":\"mblcouqehbhbcds\",\"pmbltoormkfql\":\"ndo\",\"nbmjksibjgsjjxxa\":\"xldykalsygaolnjp\"},\"tags\":{\"gxyivpinbmh\":\"nadzyq\",\"bkezn\":\"bjijkgqxnh\",\"nggiycwkdtaa\":\"aujvaa\",\"ekaum\":\"xw\"}}") - .toObject(AutoMLJob.class); - Assertions.assertEquals("lxhrp", model.description()); - Assertions.assertEquals("mblcouqehbhbcds", model.properties().get("iryr")); - Assertions.assertEquals("nadzyq", model.tags().get("gxyivpinbmh")); - Assertions.assertEquals("ehaepwamcxtc", model.componentId()); - Assertions.assertEquals("upeuknijduyye", model.computeId()); - Assertions.assertEquals("ydjfb", model.displayName()); - Assertions.assertEquals("yv", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("wikdmh", model.services().get("xjcmmzrrsc").endpoint()); - Assertions.assertEquals("uacdixmxuf", model.services().get("xjcmmzrrsc").jobServiceType()); - Assertions.assertEquals(2084049172, model.services().get("xjcmmzrrsc").port()); - Assertions.assertEquals("qg", model.services().get("xjcmmzrrsc").properties().get("kfnozoeoqbvj")); - Assertions.assertEquals("uttdiygbp", model.environmentId()); - Assertions.assertEquals("swmtxk", model.environmentVariables().get("ctwwgzw")); - Assertions.assertEquals("vne", model.outputs().get("zaifghtmoqqtlff").description()); - Assertions.assertEquals(339434421, model.resources().instanceCount()); - Assertions.assertEquals("nur", model.resources().instanceType()); - Assertions.assertEquals("kzyaup", model.resources().dockerArgs()); - Assertions.assertEquals("ccxnafbwqroohtuo", model.resources().shmSize()); - Assertions.assertEquals(LogVerbosity.DEBUG, model.taskDetails().logVerbosity()); - Assertions.assertEquals("aoaguhicqlli", model.taskDetails().targetColumnName()); - Assertions.assertEquals("vhrweftkwqejpmv", model.taskDetails().trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("ac", model.taskDetails().trainingData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLJob model = - new AutoMLJob() - .withDescription("lxhrp") - .withProperties( - mapOf("iryr", "mblcouqehbhbcds", "pmbltoormkfql", "ndo", "nbmjksibjgsjjxxa", "xldykalsygaolnjp")) - .withTags( - mapOf("gxyivpinbmh", "nadzyq", "bkezn", "bjijkgqxnh", "nggiycwkdtaa", "aujvaa", "ekaum", "xw")) - .withComponentId("ehaepwamcxtc") - .withComputeId("upeuknijduyye") - .withDisplayName("ydjfb") - .withExperimentName("yv") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "xjcmmzrrsc", - new JobService() - .withEndpoint("wikdmh") - .withJobServiceType("uacdixmxuf") - .withPort(2084049172) - .withProperties( - mapOf("kfnozoeoqbvj", "qg", "ay", "vefgwbmqjchntas", "wyvf", "xbulpzealbmqkyo")), - "k", - new JobService() - .withEndpoint("i") - .withJobServiceType("cjrmmua") - .withPort(1056195369) - .withProperties( - mapOf( - "e", - "jogjonmc", - "akpoldtvevbo", - "oyzbamwineofvf", - "zjknyuxg", - "lz", - "mrdixtreki", - "ttxpnrupza")))) - .withEnvironmentId("uttdiygbp") - .withEnvironmentVariables(mapOf("ctwwgzw", "swmtxk", "og", "jlmec")) - .withOutputs( - mapOf( - "zaifghtmoqqtlff", - new JobOutput().withDescription("vne"), - "avfqnvhnqoewdogi", - new JobOutput().withDescription("bkrkjj"), - "t", - new JobOutput().withDescription("tesypvidbztjh"), - "p", - new JobOutput().withDescription("ovnynkbwetnju"))) - .withResources( - new JobResourceConfiguration() - .withInstanceCount(339434421) - .withInstanceType("nur") - .withProperties( - mapOf( - "ecmslclbl", - "datamghihp", - "bsjuscvsfx", - "datajxl", - "cydrtceukdqkk", - "datagctmgxuupbezq", - "chillcecf", - "dataihztgeqmgqzgwldo")) - .withDockerArgs("kzyaup") - .withShmSize("ccxnafbwqroohtuo")) - .withTaskDetails( - new AutoMLVertical() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("aoaguhicqlli") - .withTrainingData( - new MLTableJobInput() - .withDescription("vhrweftkwqejpmv") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("ac"))); - model = BinaryData.fromObject(model).toObject(AutoMLJob.class); - Assertions.assertEquals("lxhrp", model.description()); - Assertions.assertEquals("mblcouqehbhbcds", model.properties().get("iryr")); - Assertions.assertEquals("nadzyq", model.tags().get("gxyivpinbmh")); - Assertions.assertEquals("ehaepwamcxtc", model.componentId()); - Assertions.assertEquals("upeuknijduyye", model.computeId()); - Assertions.assertEquals("ydjfb", model.displayName()); - Assertions.assertEquals("yv", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("wikdmh", model.services().get("xjcmmzrrsc").endpoint()); - Assertions.assertEquals("uacdixmxuf", model.services().get("xjcmmzrrsc").jobServiceType()); - Assertions.assertEquals(2084049172, model.services().get("xjcmmzrrsc").port()); - Assertions.assertEquals("qg", model.services().get("xjcmmzrrsc").properties().get("kfnozoeoqbvj")); - Assertions.assertEquals("uttdiygbp", model.environmentId()); - Assertions.assertEquals("swmtxk", model.environmentVariables().get("ctwwgzw")); - Assertions.assertEquals("vne", model.outputs().get("zaifghtmoqqtlff").description()); - Assertions.assertEquals(339434421, model.resources().instanceCount()); - Assertions.assertEquals("nur", model.resources().instanceType()); - Assertions.assertEquals("kzyaup", model.resources().dockerArgs()); - Assertions.assertEquals("ccxnafbwqroohtuo", model.resources().shmSize()); - Assertions.assertEquals(LogVerbosity.DEBUG, model.taskDetails().logVerbosity()); - Assertions.assertEquals("aoaguhicqlli", model.taskDetails().targetColumnName()); - Assertions.assertEquals("vhrweftkwqejpmv", model.taskDetails().trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.taskDetails().trainingData().mode()); - Assertions.assertEquals("ac", model.taskDetails().trainingData().uri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java deleted file mode 100644 index 8d3ae3ca9647..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoMLVerticalTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoMLVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class AutoMLVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoMLVertical model = - BinaryData - .fromString( - "{\"taskType\":\"AutoMLVertical\",\"logVerbosity\":\"Critical\",\"targetColumnName\":\"eocnhzqrottj\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"yjzp\",\"description\":\"rl\"}}") - .toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("eocnhzqrottj", model.targetColumnName()); - Assertions.assertEquals("rl", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("yjzp", model.trainingData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoMLVertical model = - new AutoMLVertical() - .withLogVerbosity(LogVerbosity.CRITICAL) - .withTargetColumnName("eocnhzqrottj") - .withTrainingData( - new MLTableJobInput().withDescription("rl").withMode(InputDeliveryMode.DOWNLOAD).withUri("yjzp")); - model = BinaryData.fromObject(model).toObject(AutoMLVertical.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("eocnhzqrottj", model.targetColumnName()); - Assertions.assertEquals("rl", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("yjzp", model.trainingData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java deleted file mode 100644 index 58b47b826dc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoNCrossValidationsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoNCrossValidations; - -public final class AutoNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoNCrossValidations model = - BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoNCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoNCrossValidations model = new AutoNCrossValidations(); - model = BinaryData.fromObject(model).toObject(AutoNCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java deleted file mode 100644 index f12d789871f5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoPausePropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoPausePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoPauseProperties model = - BinaryData - .fromString("{\"delayInMinutes\":1505052289,\"enabled\":true}") - .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1505052289, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1505052289).withEnabled(true); - model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1505052289, model.delayInMinutes()); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java deleted file mode 100644 index c895c8da1043..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoScalePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoScalePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoScaleProperties model = - BinaryData - .fromString("{\"minNodeCount\":814110880,\"enabled\":true,\"maxNodeCount\":1557135644}") - .toObject(AutoScaleProperties.class); - Assertions.assertEquals(814110880, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1557135644, model.maxNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoScaleProperties model = - new AutoScaleProperties().withMinNodeCount(814110880).withEnabled(true).withMaxNodeCount(1557135644); - model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(814110880, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1557135644, model.maxNodeCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java deleted file mode 100644 index e0e0e8665c43..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoSeasonalityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoSeasonality; - -public final class AutoSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoSeasonality model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoSeasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoSeasonality model = new AutoSeasonality(); - model = BinaryData.fromObject(model).toObject(AutoSeasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java deleted file mode 100644 index 127caf51febf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetLagsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetLags; - -public final class AutoTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetLags model = BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetLags model = new AutoTargetLags(); - model = BinaryData.fromObject(model).toObject(AutoTargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java deleted file mode 100644 index 14db2d76c61f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/AutoTargetRollingWindowSizeTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoTargetRollingWindowSize; - -public final class AutoTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoTargetRollingWindowSize model = - BinaryData.fromString("{\"mode\":\"Auto\"}").toObject(AutoTargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoTargetRollingWindowSize model = new AutoTargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(AutoTargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java deleted file mode 100644 index e2609437faf5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BanditPolicyTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BanditPolicy; -import org.junit.jupiter.api.Assertions; - -public final class BanditPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BanditPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"Bandit\",\"slackAmount\":59.648163,\"slackFactor\":43.063473,\"delayEvaluation\":364097944,\"evaluationInterval\":2114496472}") - .toObject(BanditPolicy.class); - Assertions.assertEquals(364097944, model.delayEvaluation()); - Assertions.assertEquals(2114496472, model.evaluationInterval()); - Assertions.assertEquals(59.648163F, model.slackAmount()); - Assertions.assertEquals(43.063473F, model.slackFactor()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BanditPolicy model = - new BanditPolicy() - .withDelayEvaluation(364097944) - .withEvaluationInterval(2114496472) - .withSlackAmount(59.648163F) - .withSlackFactor(43.063473F); - model = BinaryData.fromObject(model).toObject(BanditPolicy.class); - Assertions.assertEquals(364097944, model.delayEvaluation()); - Assertions.assertEquals(2114496472, model.evaluationInterval()); - Assertions.assertEquals(59.648163F, model.slackAmount()); - Assertions.assertEquals(43.063473F, model.slackFactor()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index d9c91dc82e16..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.BatchDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.BatchLoggingLevel; -import com.azure.resourcemanager.machinelearning.models.BatchOutputAction; -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 java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchDeploymentTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchDeploymentTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"byuqerpqlp\",\"value\":[{\"identity\":{\"principalId\":\"439e0872-7c89-4299-a31c-cf73792200da\",\"tenantId\":\"50121c3a-c7ab-40c4-8c70-18840ec211b8\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"dbutauvfbtkuwhh\",\"properties\":{\"compute\":\"ykojoxafnndlpic\",\"errorThreshold\":171305753,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":1638328793,\"miniBatchSize\":8200965629156318432,\"outputAction\":\"AppendRow\",\"outputFileName\":\"pwdreqnovvqf\",\"provisioningState\":\"Failed\",\"description\":\"suwsyrsnds\",\"environmentId\":\"g\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"r\",\"tier\":\"Standard\",\"size\":\"neqn\",\"family\":\"rrwlquuijfqkace\",\"capacity\":2104888829},\"location\":\"fpubjibwwi\",\"tags\":{\"ynfs\":\"hqkvpuvksgplsak\",\"jphuopxodlqi\":\"n\",\"slyzrpzbchckqq\":\"ntorzihleosjswsr\",\"suiizynkedyat\":\"qioxi\"},\"id\":\"wyhqmibzyhwits\",\"name\":\"ypyynpcdpumnzg\",\"type\":\"wznm\"},{\"identity\":{\"principalId\":\"466a0824-8e60-480f-8923-8af40473b79f\",\"tenantId\":\"77aada0f-7267-4cb3-94d7-d6d969aaa174\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"rgjhxb\",\"properties\":{\"compute\":\"tlwwrlk\",\"errorThreshold\":1940246801,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":333571047,\"miniBatchSize\":4567104725520033936,\"outputAction\":\"SummaryOnly\",\"outputFileName\":\"yhgsy\",\"provisioningState\":\"Deleting\",\"description\":\"dtbnnha\",\"environmentId\":\"ocrkvcikh\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"mqg\",\"tier\":\"Basic\",\"size\":\"ezikywggxkal\",\"family\":\"tmelw\",\"capacity\":908050565},\"location\":\"ccjzkzivgvv\",\"tags\":{\"hyrnxxmu\":\"y\",\"v\":\"edndr\"},\"id\":\"tkwqqtchealm\",\"name\":\"mtdaa\",\"type\":\"gdv\"},{\"identity\":{\"principalId\":\"b3def810-702e-4b60-ab84-3e75ff2656f0\",\"tenantId\":\"241d1b0c-4837-448d-a75d-493d5be4541e\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"g\",\"properties\":{\"compute\":\"rtfudxepxg\",\"errorThreshold\":682770513,\"loggingLevel\":\"Warning\",\"maxConcurrencyPerInstance\":1825902686,\"miniBatchSize\":4744038705838577883,\"outputAction\":\"AppendRow\",\"outputFileName\":\"himdbl\",\"provisioningState\":\"Deleting\",\"description\":\"jhfjxwm\",\"environmentId\":\"kkfoqr\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"zi\",\"tier\":\"Basic\",\"size\":\"wneaiv\",\"family\":\"czelpcirel\",\"capacity\":561356651},\"location\":\"enwabfatk\",\"tags\":{\"oulpjrv\":\"xbjhwuaanozjosph\",\"rvimjwosytxitcsk\":\"ag\",\"hlyfjhdgqgg\":\"cktqumiekkezzi\",\"qfatpxllrxcyjm\":\"bdunygaeqid\"},\"id\":\"a\",\"name\":\"su\",\"type\":\"arm\"},{\"identity\":{\"principalId\":\"ecb5ec81-5f09-4997-928a-d4e055e4403a\",\"tenantId\":\"e364d12b-cbeb-400a-949f-4056df2528ce\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"q\",\"properties\":{\"compute\":\"hhyxxrw\",\"errorThreshold\":324291601,\"loggingLevel\":\"Info\",\"maxConcurrencyPerInstance\":381030924,\"miniBatchSize\":4370015191993628840,\"outputAction\":\"AppendRow\",\"outputFileName\":\"areqna\",\"provisioningState\":\"Succeeded\",\"description\":\"ky\",\"environmentId\":\"beddgssofw\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"alkrmn\",\"tier\":\"Basic\",\"size\":\"xacqqudfnbyx\",\"family\":\"aabjyvayffimrz\",\"capacity\":1007625802},\"location\":\"qogsexnevfd\",\"tags\":{\"euzsoi\":\"wmewzsyy\"},\"id\":\"judpfrxt\",\"name\":\"thzvaytdwkqbrqu\",\"type\":\"paxh\"}]}") - .toObject(BatchDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("byuqerpqlp", model.nextLink()); - Assertions.assertEquals("fpubjibwwi", model.value().get(0).location()); - Assertions.assertEquals("hqkvpuvksgplsak", model.value().get(0).tags().get("ynfs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).kind()); - Assertions.assertEquals("suwsyrsnds", model.value().get(0).properties().description()); - Assertions.assertEquals("g", model.value().get(0).properties().environmentId()); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).properties().compute()); - Assertions.assertEquals(171305753, model.value().get(0).properties().errorThreshold()); - Assertions.assertEquals(BatchLoggingLevel.WARNING, model.value().get(0).properties().loggingLevel()); - Assertions.assertEquals(1638328793, model.value().get(0).properties().maxConcurrencyPerInstance()); - Assertions.assertEquals(8200965629156318432L, model.value().get(0).properties().miniBatchSize()); - Assertions.assertEquals(BatchOutputAction.APPEND_ROW, model.value().get(0).properties().outputAction()); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).properties().outputFileName()); - Assertions.assertEquals("r", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("neqn", model.value().get(0).sku().size()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).sku().family()); - Assertions.assertEquals(2104888829, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchDeploymentTrackedResourceArmPaginatedResult model = - new BatchDeploymentTrackedResourceArmPaginatedResult() - .withNextLink("byuqerpqlp") - .withValue( - Arrays - .asList( - new BatchDeploymentInner() - .withLocation("fpubjibwwi") - .withTags( - mapOf( - "ynfs", - "hqkvpuvksgplsak", - "jphuopxodlqi", - "n", - "slyzrpzbchckqq", - "ntorzihleosjswsr", - "suiizynkedyat", - "qioxi")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("dbutauvfbtkuwhh") - .withProperties( - new BatchDeploymentProperties() - .withDescription("suwsyrsnds") - .withEnvironmentId("g") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("ykojoxafnndlpic") - .withErrorThreshold(171305753) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(1638328793) - .withMiniBatchSize(8200965629156318432L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("pwdreqnovvqf")) - .withSku( - new Sku() - .withName("r") - .withTier(SkuTier.STANDARD) - .withSize("neqn") - .withFamily("rrwlquuijfqkace") - .withCapacity(2104888829)), - new BatchDeploymentInner() - .withLocation("ccjzkzivgvv") - .withTags(mapOf("hyrnxxmu", "y", "v", "edndr")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("rgjhxb") - .withProperties( - new BatchDeploymentProperties() - .withDescription("dtbnnha") - .withEnvironmentId("ocrkvcikh") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("tlwwrlk") - .withErrorThreshold(1940246801) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(333571047) - .withMiniBatchSize(4567104725520033936L) - .withOutputAction(BatchOutputAction.SUMMARY_ONLY) - .withOutputFileName("yhgsy")) - .withSku( - new Sku() - .withName("mqg") - .withTier(SkuTier.BASIC) - .withSize("ezikywggxkal") - .withFamily("tmelw") - .withCapacity(908050565)), - new BatchDeploymentInner() - .withLocation("enwabfatk") - .withTags( - mapOf( - "oulpjrv", - "xbjhwuaanozjosph", - "rvimjwosytxitcsk", - "ag", - "hlyfjhdgqgg", - "cktqumiekkezzi", - "qfatpxllrxcyjm", - "bdunygaeqid")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("g") - .withProperties( - new BatchDeploymentProperties() - .withDescription("jhfjxwm") - .withEnvironmentId("kkfoqr") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("rtfudxepxg") - .withErrorThreshold(682770513) - .withLoggingLevel(BatchLoggingLevel.WARNING) - .withMaxConcurrencyPerInstance(1825902686) - .withMiniBatchSize(4744038705838577883L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("himdbl")) - .withSku( - new Sku() - .withName("zi") - .withTier(SkuTier.BASIC) - .withSize("wneaiv") - .withFamily("czelpcirel") - .withCapacity(561356651)), - new BatchDeploymentInner() - .withLocation("qogsexnevfd") - .withTags(mapOf("euzsoi", "wmewzsyy")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("q") - .withProperties( - new BatchDeploymentProperties() - .withDescription("ky") - .withEnvironmentId("beddgssofw") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withCompute("hhyxxrw") - .withErrorThreshold(324291601) - .withLoggingLevel(BatchLoggingLevel.INFO) - .withMaxConcurrencyPerInstance(381030924) - .withMiniBatchSize(4370015191993628840L) - .withOutputAction(BatchOutputAction.APPEND_ROW) - .withOutputFileName("areqna")) - .withSku( - new Sku() - .withName("alkrmn") - .withTier(SkuTier.BASIC) - .withSize("xacqqudfnbyx") - .withFamily("aabjyvayffimrz") - .withCapacity(1007625802)))); - model = BinaryData.fromObject(model).toObject(BatchDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("byuqerpqlp", model.nextLink()); - Assertions.assertEquals("fpubjibwwi", model.value().get(0).location()); - Assertions.assertEquals("hqkvpuvksgplsak", model.value().get(0).tags().get("ynfs")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("dbutauvfbtkuwhh", model.value().get(0).kind()); - Assertions.assertEquals("suwsyrsnds", model.value().get(0).properties().description()); - Assertions.assertEquals("g", model.value().get(0).properties().environmentId()); - Assertions.assertEquals("ykojoxafnndlpic", model.value().get(0).properties().compute()); - Assertions.assertEquals(171305753, model.value().get(0).properties().errorThreshold()); - Assertions.assertEquals(BatchLoggingLevel.WARNING, model.value().get(0).properties().loggingLevel()); - Assertions.assertEquals(1638328793, model.value().get(0).properties().maxConcurrencyPerInstance()); - Assertions.assertEquals(8200965629156318432L, model.value().get(0).properties().miniBatchSize()); - Assertions.assertEquals(BatchOutputAction.APPEND_ROW, model.value().get(0).properties().outputAction()); - Assertions.assertEquals("pwdreqnovvqf", model.value().get(0).properties().outputFileName()); - Assertions.assertEquals("r", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("neqn", model.value().get(0).sku().size()); - Assertions.assertEquals("rrwlquuijfqkace", model.value().get(0).sku().family()); - Assertions.assertEquals(2104888829, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java deleted file mode 100644 index 4a747598b2ef..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchDeploymentsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .batchDeployments() - .delete("ujdsooxrqwo", "urbti", "apdyarikeejdpdfh", "wmmkfq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java deleted file mode 100644 index 46d3c7593386..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointDefaultsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointDefaults; -import org.junit.jupiter.api.Assertions; - -public final class BatchEndpointDefaultsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchEndpointDefaults model = - BinaryData.fromString("{\"deploymentName\":\"wsbpfvm\"}").toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("wsbpfvm", model.deploymentName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointDefaults model = new BatchEndpointDefaults().withDeploymentName("wsbpfvm"); - model = BinaryData.fromObject(model).toObject(BatchEndpointDefaults.class); - Assertions.assertEquals("wsbpfvm", model.deploymentName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index f8fc66942d42..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.BatchEndpointInner; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.BatchEndpointTrackedResourceArmPaginatedResult; -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 java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BatchEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchEndpointTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"gcj\",\"value\":[{\"identity\":{\"principalId\":\"f81557b3-3455-43a9-863a-877ebc9a8614\",\"tenantId\":\"ca2f438e-dabf-4a7a-808b-9b35946ac806\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"ttdumorppxebmnzb\",\"properties\":{\"provisioningState\":\"Canceled\",\"authMode\":\"Key\",\"description\":\"lkfg\",\"properties\":{},\"scoringUri\":\"euel\",\"swaggerUri\":\"hsd\"},\"sku\":{\"name\":\"t\",\"tier\":\"Standard\",\"size\":\"kd\",\"family\":\"wq\",\"capacity\":180318621},\"location\":\"zx\",\"tags\":{\"sg\":\"ithhqzon\",\"c\":\"b\"},\"id\":\"hfwdsjnkaljutiis\",\"name\":\"acffgdkzzewkfvhq\",\"type\":\"railvpnppfuf\"}]}") - .toObject(BatchEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("gcj", model.nextLink()); - Assertions.assertEquals("zx", model.value().get(0).location()); - Assertions.assertEquals("ithhqzon", model.value().get(0).tags().get("sg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ttdumorppxebmnzb", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals("lkfg", model.value().get(0).properties().description()); - Assertions.assertEquals("t", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("kd", model.value().get(0).sku().size()); - Assertions.assertEquals("wq", model.value().get(0).sku().family()); - Assertions.assertEquals(180318621, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchEndpointTrackedResourceArmPaginatedResult model = - new BatchEndpointTrackedResourceArmPaginatedResult() - .withNextLink("gcj") - .withValue( - Arrays - .asList( - new BatchEndpointInner() - .withLocation("zx") - .withTags(mapOf("sg", "ithhqzon", "c", "b")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("ttdumorppxebmnzb") - .withProperties( - new BatchEndpointProperties() - .withAuthMode(EndpointAuthMode.KEY) - .withDescription("lkfg") - .withProperties(mapOf())) - .withSku( - new Sku() - .withName("t") - .withTier(SkuTier.STANDARD) - .withSize("kd") - .withFamily("wq") - .withCapacity(180318621)))); - model = BinaryData.fromObject(model).toObject(BatchEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("gcj", model.nextLink()); - Assertions.assertEquals("zx", model.value().get(0).location()); - Assertions.assertEquals("ithhqzon", model.value().get(0).tags().get("sg")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("ttdumorppxebmnzb", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.KEY, model.value().get(0).properties().authMode()); - Assertions.assertEquals("lkfg", model.value().get(0).properties().description()); - Assertions.assertEquals("t", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - Assertions.assertEquals("kd", model.value().get(0).sku().size()); - Assertions.assertEquals("wq", model.value().get(0).sku().family()); - Assertions.assertEquals(180318621, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java deleted file mode 100644 index 649798134483..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchEndpointsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BatchEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.batchEndpoints().delete("pm", "rdlhvdvmiphbe", "eqjzm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java deleted file mode 100644 index 5828f1ca72ec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BatchRetrySettingsTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BatchRetrySettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class BatchRetrySettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BatchRetrySettings model = - BinaryData - .fromString("{\"maxRetries\":80770684,\"timeout\":\"PT155H21M58S\"}") - .toObject(BatchRetrySettings.class); - Assertions.assertEquals(80770684, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT155H21M58S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BatchRetrySettings model = - new BatchRetrySettings().withMaxRetries(80770684).withTimeout(Duration.parse("PT155H21M58S")); - model = BinaryData.fromObject(model).toObject(BatchRetrySettings.class); - Assertions.assertEquals(80770684, model.maxRetries()); - Assertions.assertEquals(Duration.parse("PT155H21M58S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java deleted file mode 100644 index eff5b3a84ec3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BayesianSamplingAlgorithmTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BayesianSamplingAlgorithm; - -public final class BayesianSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BayesianSamplingAlgorithm model = - BinaryData.fromString("{\"samplingAlgorithmType\":\"Bayesian\"}").toObject(BayesianSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BayesianSamplingAlgorithm model = new BayesianSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(BayesianSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java deleted file mode 100644 index f45e52a1aad6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/BuildContextTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import org.junit.jupiter.api.Assertions; - -public final class BuildContextTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildContext model = - BinaryData - .fromString("{\"contextUri\":\"mfpjbabw\",\"dockerfilePath\":\"fcxsspuunnoxy\"}") - .toObject(BuildContext.class); - Assertions.assertEquals("mfpjbabw", model.contextUri()); - Assertions.assertEquals("fcxsspuunnoxy", model.dockerfilePath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildContext model = new BuildContext().withContextUri("mfpjbabw").withDockerfilePath("fcxsspuunnoxy"); - model = BinaryData.fromObject(model).toObject(BuildContext.class); - Assertions.assertEquals("mfpjbabw", model.contextUri()); - Assertions.assertEquals("fcxsspuunnoxy", model.dockerfilePath()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.java deleted file mode 100644 index 54361a6a37d2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.Classification; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Classification model = - BinaryData - .fromString( - "{\"taskType\":\"Classification\",\"positiveLabel\":\"z\",\"primaryMetric\":\"Accuracy\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"BernoulliNaiveBayes\",\"KNN\",\"LogisticRegression\",\"DecisionTree\"],\"blockedTrainingAlgorithms\":[\"SGD\",\"LightGBM\",\"SVM\"],\"enableDnnTraining\":true,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT239H29M50S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"dataclvdjjukyrdnqod\",\"stackMetaLearnerTrainPercentage\":30.06941234013376,\"stackMetaLearnerType\":\"LightGBMClassifier\"}},\"cvSplitColumnNames\":[\"aqnvzoqgyipemchg\",\"v\"],\"featurizationSettings\":{\"blockedTransformers\":[\"WoETargetEncoder\",\"WordEmbedding\",\"LabelEncoder\"],\"columnNameAndTypes\":{\"iuh\":\"ptlghwzhomewjjst\",\"ia\":\"awmo\",\"vodrrslblxydkxr\":\"cz\"},\"enableDnnFeaturization\":true,\"mode\":\"Off\",\"transformerParams\":{\"g\":[],\"qljnqkhychoco\":[],\"lehu\":[]},\"datasetLanguage\":\"lrqff\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":50.27087572372039,\"maxConcurrentTrials\":450328402,\"maxCoresPerTrial\":1075829949,\"maxTrials\":662993818,\"timeout\":\"PT194H12M11S\",\"trialTimeout\":\"PT236H50M57S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"rxmrgchbapx\",\"description\":\"y\"},\"testDataSize\":1.7164995710023723,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"buscgduus\",\"description\":\"ycblevpmcl\"},\"validationDataSize\":38.79068857320828,\"weightColumnName\":\"yxlzgs\",\"logVerbosity\":\"Info\",\"targetColumnName\":\"zltafhbzffovwm\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"zqs\",\"description\":\"pgvdwnapfdqw\"}}") - .toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.INFO, model.logVerbosity()); - Assertions.assertEquals("zltafhbzffovwm", model.targetColumnName()); - Assertions.assertEquals("pgvdwnapfdqw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zqs", model.trainingData().uri()); - Assertions.assertEquals("z", model.positiveLabel()); - Assertions.assertEquals(ClassificationPrimaryMetrics.ACCURACY, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions - .assertEquals(Duration.parse("PT239H29M50S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 30.06941234013376D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("aqnvzoqgyipemchg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("lrqff", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WO_ETARGET_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ptlghwzhomewjjst", model.featurizationSettings().columnNameAndTypes().get("iuh")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.OFF, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(50.27087572372039D, model.limitSettings().exitScore()); - Assertions.assertEquals(450328402, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1075829949, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(662993818, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT194H12M11S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT236H50M57S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("y", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.testData().mode()); - Assertions.assertEquals("rxmrgchbapx", model.testData().uri()); - Assertions.assertEquals(1.7164995710023723D, model.testDataSize()); - Assertions.assertEquals("ycblevpmcl", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("buscgduus", model.validationData().uri()); - Assertions.assertEquals(38.79068857320828D, model.validationDataSize()); - Assertions.assertEquals("yxlzgs", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Classification model = - new Classification() - .withLogVerbosity(LogVerbosity.INFO) - .withTargetColumnName("zltafhbzffovwm") - .withTrainingData( - new MLTableJobInput() - .withDescription("pgvdwnapfdqw") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("zqs")) - .withPositiveLabel("z") - .withPrimaryMetric(ClassificationPrimaryMetrics.ACCURACY) - .withTrainingSettings( - new ClassificationTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(true) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT239H29M50S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("dataclvdjjukyrdnqod") - .withStackMetaLearnerTrainPercentage(30.06941234013376D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER)) - .withAllowedTrainingAlgorithms( - Arrays - .asList( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - ClassificationModels.KNN, - ClassificationModels.LOGISTIC_REGRESSION, - ClassificationModels.DECISION_TREE)) - .withBlockedTrainingAlgorithms( - Arrays - .asList( - ClassificationModels.SGD, - ClassificationModels.LIGHT_GBM, - ClassificationModels.SVM))) - .withCvSplitColumnNames(Arrays.asList("aqnvzoqgyipemchg", "v")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("lrqff") - .withBlockedTransformers( - Arrays - .asList( - BlockedTransformers.WO_ETARGET_ENCODER, - BlockedTransformers.WORD_EMBEDDING, - BlockedTransformers.LABEL_ENCODER)) - .withColumnNameAndTypes(mapOf("iuh", "ptlghwzhomewjjst", "ia", "awmo", "vodrrslblxydkxr", "cz")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.OFF) - .withTransformerParams( - mapOf("g", Arrays.asList(), "qljnqkhychoco", Arrays.asList(), "lehu", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(50.27087572372039D) - .withMaxConcurrentTrials(450328402) - .withMaxCoresPerTrial(1075829949) - .withMaxTrials(662993818) - .withTimeout(Duration.parse("PT194H12M11S")) - .withTrialTimeout(Duration.parse("PT236H50M57S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("y") - .withMode(InputDeliveryMode.DIRECT) - .withUri("rxmrgchbapx")) - .withTestDataSize(1.7164995710023723D) - .withValidationData( - new MLTableJobInput() - .withDescription("ycblevpmcl") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("buscgduus")) - .withValidationDataSize(38.79068857320828D) - .withWeightColumnName("yxlzgs"); - model = BinaryData.fromObject(model).toObject(Classification.class); - Assertions.assertEquals(LogVerbosity.INFO, model.logVerbosity()); - Assertions.assertEquals("zltafhbzffovwm", model.targetColumnName()); - Assertions.assertEquals("pgvdwnapfdqw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("zqs", model.trainingData().uri()); - Assertions.assertEquals("z", model.positiveLabel()); - Assertions.assertEquals(ClassificationPrimaryMetrics.ACCURACY, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(true, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions - .assertEquals(Duration.parse("PT239H29M50S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 30.06941234013376D, model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ClassificationModels.BERNOULLI_NAIVE_BAYES, - model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.SGD, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("aqnvzoqgyipemchg", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("lrqff", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WO_ETARGET_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("ptlghwzhomewjjst", model.featurizationSettings().columnNameAndTypes().get("iuh")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.OFF, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(50.27087572372039D, model.limitSettings().exitScore()); - Assertions.assertEquals(450328402, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1075829949, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(662993818, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT194H12M11S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT236H50M57S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("y", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.testData().mode()); - Assertions.assertEquals("rxmrgchbapx", model.testData().uri()); - Assertions.assertEquals(1.7164995710023723D, model.testDataSize()); - Assertions.assertEquals("ycblevpmcl", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("buscgduus", model.validationData().uri()); - Assertions.assertEquals(38.79068857320828D, model.validationDataSize()); - Assertions.assertEquals("yxlzgs", model.weightColumnName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java deleted file mode 100644 index 4cc81b1ca45e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClassificationTrainingSettingsTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationModels; -import com.azure.resourcemanager.machinelearning.models.ClassificationTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClassificationTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClassificationTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"LinearSVM\",\"KNN\"],\"blockedTrainingAlgorithms\":[\"LogisticRegression\"],\"enableDnnTraining\":false,\"enableModelExplainability\":true,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT171H27M12S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"dataeseyqr\",\"stackMetaLearnerTrainPercentage\":0.8015922020078059,\"stackMetaLearnerType\":\"LightGBMClassifier\"}}") - .toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT171H27M12S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(0.8015922020078059D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ClassificationModels.LINEAR_SVM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.LOGISTIC_REGRESSION, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClassificationTrainingSettings model = - new ClassificationTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(true) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT171H27M12S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("dataeseyqr") - .withStackMetaLearnerTrainPercentage(0.8015922020078059D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMCLASSIFIER)) - .withAllowedTrainingAlgorithms(Arrays.asList(ClassificationModels.LINEAR_SVM, ClassificationModels.KNN)) - .withBlockedTrainingAlgorithms(Arrays.asList(ClassificationModels.LOGISTIC_REGRESSION)); - model = BinaryData.fromObject(model).toObject(ClassificationTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(true, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT171H27M12S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(0.8015922020078059D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMCLASSIFIER, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ClassificationModels.LINEAR_SVM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ClassificationModels.LOGISTIC_REGRESSION, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java deleted file mode 100644 index 34fb2ad4a38d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdateParametersTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClusterUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; - -public final class ClusterUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateParameters model = - BinaryData.fromString("{\"properties\":{\"properties\":{}}}").toObject(ClusterUpdateParameters.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateParameters model = new ClusterUpdateParameters().withProperties(new ScaleSettingsInformation()); - model = BinaryData.fromObject(model).toObject(ClusterUpdateParameters.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java deleted file mode 100644 index af927978ddd6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ClusterUpdatePropertiesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ClusterUpdateProperties; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ClusterUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterUpdateProperties model = - BinaryData - .fromString( - "{\"properties\":{\"scaleSettings\":{\"maxNodeCount\":735455048,\"minNodeCount\":1281560612,\"nodeIdleTimeBeforeScaleDown\":\"PT89H36M53S\"}}}") - .toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(735455048, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(1281560612, model.properties().scaleSettings().minNodeCount()); - Assertions - .assertEquals( - Duration.parse("PT89H36M53S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterUpdateProperties model = - new ClusterUpdateProperties() - .withProperties( - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(735455048) - .withMinNodeCount(1281560612) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT89H36M53S")))); - model = BinaryData.fromObject(model).toObject(ClusterUpdateProperties.class); - Assertions.assertEquals(735455048, model.properties().scaleSettings().maxNodeCount()); - Assertions.assertEquals(1281560612, model.properties().scaleSettings().minNodeCount()); - Assertions - .assertEquals( - Duration.parse("PT89H36M53S"), model.properties().scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java deleted file mode 100644 index 45ffe83779de..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerInnerTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"zbhd\",\"nextVersion\":\"mlmz\",\"description\":\"oftrmaequia\",\"properties\":{\"nswhcc\":\"cslfaoqzpiyylha\",\"aivwitqscywu\":\"ph\"},\"tags\":{\"i\":\"oluhczbwemh\",\"wmsweypqwd\":\"sbrgz\",\"mkttlstvlzywem\":\"ggicccnxqhue\",\"lusiy\":\"zrncsdt\"}},\"id\":\"sfgytguslfead\",\"name\":\"ygqukyhejh\",\"type\":\"isxgfp\"}") - .toObject(CodeContainerInner.class); - Assertions.assertEquals("oftrmaequia", model.properties().description()); - Assertions.assertEquals("cslfaoqzpiyylha", model.properties().properties().get("nswhcc")); - Assertions.assertEquals("oluhczbwemh", model.properties().tags().get("i")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerInner model = - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("oftrmaequia") - .withProperties(mapOf("nswhcc", "cslfaoqzpiyylha", "aivwitqscywu", "ph")) - .withTags( - mapOf( - "i", - "oluhczbwemh", - "wmsweypqwd", - "sbrgz", - "mkttlstvlzywem", - "ggicccnxqhue", - "lusiy", - "zrncsdt")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(CodeContainerInner.class); - Assertions.assertEquals("oftrmaequia", model.properties().description()); - Assertions.assertEquals("cslfaoqzpiyylha", model.properties().properties().get("nswhcc")); - Assertions.assertEquals("oluhczbwemh", model.properties().tags().get("i")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java deleted file mode 100644 index 18c6c8a71c1b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":true,\"latestVersion\":\"p\",\"nextVersion\":\"ksrpqv\",\"description\":\"zraehtwd\",\"properties\":{\"cdl\":\"tswiby\",\"hfwpracstwit\":\"h\",\"nmdyodnwzxl\":\"khevxccedc\",\"nhltiugcxn\":\"jc\"},\"tags\":{\"nyowxwlmdjrkvfg\":\"wxqibyq\",\"j\":\"vfvpdbodaciz\",\"hvxndzwmkrefajpj\":\"lhkrribdeibqipqk\"}}") - .toObject(CodeContainerProperties.class); - Assertions.assertEquals("zraehtwd", model.description()); - Assertions.assertEquals("tswiby", model.properties().get("cdl")); - Assertions.assertEquals("wxqibyq", model.tags().get("nyowxwlmdjrkvfg")); - Assertions.assertEquals(true, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerProperties model = - new CodeContainerProperties() - .withDescription("zraehtwd") - .withProperties( - mapOf("cdl", "tswiby", "hfwpracstwit", "h", "nmdyodnwzxl", "khevxccedc", "nhltiugcxn", "jc")) - .withTags( - mapOf("nyowxwlmdjrkvfg", "wxqibyq", "j", "vfvpdbodaciz", "hvxndzwmkrefajpj", "lhkrribdeibqipqk")) - .withIsArchived(true); - model = BinaryData.fromObject(model).toObject(CodeContainerProperties.class); - Assertions.assertEquals("zraehtwd", model.description()); - Assertions.assertEquals("tswiby", model.properties().get("cdl")); - Assertions.assertEquals("wxqibyq", model.tags().get("nyowxwlmdjrkvfg")); - Assertions.assertEquals(true, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index 3178496ff08e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.CodeContainerInner; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import com.azure.resourcemanager.machinelearning.models.CodeContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CodeContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CodeContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"kojvd\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"ouicybxarzgszu\",\"nextVersion\":\"x\",\"description\":\"q\",\"properties\":{},\"tags\":{}},\"id\":\"oamciodh\",\"name\":\"haz\",\"type\":\"khnzbonlw\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"gokdwbwhks\",\"nextVersion\":\"cmrvexzt\",\"description\":\"t\",\"properties\":{},\"tags\":{}},\"id\":\"ra\",\"name\":\"yzkoowtlmngu\",\"type\":\"aw\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"syuuximerq\",\"nextVersion\":\"bw\",\"description\":\"nkbykutwpfhp\",\"properties\":{},\"tags\":{}},\"id\":\"r\",\"name\":\"kdsnfdsdoakgtdl\",\"type\":\"kkze\"},{\"properties\":{\"isArchived\":false,\"latestVersion\":\"ewpusdsttwvogvb\",\"nextVersion\":\"jdcngqqm\",\"description\":\"kufgmj\",\"properties\":{},\"tags\":{}},\"id\":\"dgrtwaenuuzkopbm\",\"name\":\"nrfdw\",\"type\":\"yuhhziu\"}]}") - .toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("kojvd", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CodeContainerResourceArmPaginatedResult model = - new CodeContainerResourceArmPaginatedResult() - .withNextLink("kojvd") - .withValue( - Arrays - .asList( - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("q") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("t") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("nkbykutwpfhp") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new CodeContainerInner() - .withProperties( - new CodeContainerProperties() - .withDescription("kufgmj") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false)))); - model = BinaryData.fromObject(model).toObject(CodeContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("kojvd", model.nextLink()); - Assertions.assertEquals("q", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2d055797b46d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import com.azure.resourcemanager.machinelearning.models.CodeContainerProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CodeContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"bwfwhxorpwaltzwu\",\"nextVersion\":\"xojfcc\",\"description\":\"h\",\"properties\":{\"xcdrzprobzzxezm\":\"thvazjpw\",\"jeuxsphlo\":\"rkjg\",\"ufvcgnrgl\":\"fpmijpdvzvfbhwbd\"},\"tags\":{\"ebzx\":\"wyambhba\",\"qutibhl\":\"k\",\"bduxvzmlghnys\":\"nntrvrkps\",\"kppdi\":\"lpyeu\"}},\"id\":\"bo\",\"name\":\"xvhhyqq\",\"type\":\"gatxgrznmginmtsd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = - manager - .codeContainers() - .define("xyauxre") - .withExistingWorkspace("wrswyiljp", "bkgx") - .withProperties( - new CodeContainerProperties() - .withDescription("gpwb") - .withProperties(mapOf("li", "ri")) - .withTags( - mapOf( - "bibticuhqvum", - "cgnwplrrbphcts", - "eqbbewfcuqfpy", - "pbfs", - "eyyjshcybwfuppox", - "xmzrmtmvwitu", - "iikmoxrezsvavlrx", - "rcmvouujx")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("h", response.properties().description()); - Assertions.assertEquals("thvazjpw", response.properties().properties().get("xcdrzprobzzxezm")); - Assertions.assertEquals("wyambhba", response.properties().tags().get("ebzx")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 7a8d44abb002..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CodeContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .codeContainers() - .deleteWithResponse("hkigglclwalhvub", "gzphetxd", "cmyc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java deleted file mode 100644 index 3efd57df3af4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CodeContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"x\",\"nextVersion\":\"fpzvoikvntwczf\",\"description\":\"ushlcxpblalh\",\"properties\":{\"kissaidqzsaa\":\"p\",\"fiafc\":\"qdsgptotxj\"},\"tags\":{\"cao\":\"tbfijz\"}},\"id\":\"olbuauktwieope\",\"name\":\"e\",\"type\":\"xq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CodeContainer response = - manager - .codeContainers() - .getWithResponse("ajqzj", "alec", "bibiwks", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ushlcxpblalh", response.properties().description()); - Assertions.assertEquals("p", response.properties().properties().get("kissaidqzsaa")); - Assertions.assertEquals("tbfijz", response.properties().tags().get("cao")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.java deleted file mode 100644 index 303e81d6000f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeContainersListMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.CodeContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CodeContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"isArchived\":false,\"latestVersion\":\"mazdfsqxh\",\"nextVersion\":\"mrejparnpvgr\",\"description\":\"rbwtdrcwgzwl\",\"properties\":{\"acfculzjrmhpf\":\"lhhfi\",\"xsoxi\":\"wvyldqpzf\"},\"tags\":{\"qqt\":\"jlzkdrocqsxy\"}},\"id\":\"iwdwisvnmeylajam\",\"name\":\"ajyhftpzc\",\"type\":\"ryklleynqa\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.codeContainers().list("aluzyi", "fcvcewbwq", "dgsjsat", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rbwtdrcwgzwl", response.iterator().next().properties().description()); - Assertions.assertEquals("lhhfi", response.iterator().next().properties().properties().get("acfculzjrmhpf")); - Assertions.assertEquals("jlzkdrocqsxy", response.iterator().next().properties().tags().get("qqt")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 9cdca2627d86..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CodeVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CodeVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .codeVersions() - .deleteWithResponse("j", "xowkdnj", "xgkrh", "iehycpnowawonoe", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java deleted file mode 100644 index fc0822215bd4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ColumnTransformerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ColumnTransformerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ColumnTransformer model = - BinaryData - .fromString("{\"fields\":[\"dsmjtgr\",\"gdgkki\"],\"parameters\":\"dataplkcsm\"}") - .toObject(ColumnTransformer.class); - Assertions.assertEquals("dsmjtgr", model.fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ColumnTransformer model = - new ColumnTransformer().withFields(Arrays.asList("dsmjtgr", "gdgkki")).withParameters("dataplkcsm"); - model = BinaryData.fromObject(model).toObject(ColumnTransformer.class); - Assertions.assertEquals("dsmjtgr", model.fields().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java deleted file mode 100644 index b51a96cea334..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CommandJobLimitsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CommandJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class CommandJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CommandJobLimits model = - BinaryData - .fromString("{\"jobLimitsType\":\"Command\",\"timeout\":\"PT130H21M4S\"}") - .toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT130H21M4S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CommandJobLimits model = new CommandJobLimits().withTimeout(Duration.parse("PT130H21M4S")); - model = BinaryData.fromObject(model).toObject(CommandJobLimits.class); - Assertions.assertEquals(Duration.parse("PT130H21M4S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java deleted file mode 100644 index 179ff3923e2c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"snjvcdwxlpqekftn\",\"nextVersion\":\"tjsyin\",\"description\":\"fq\",\"properties\":{\"ikdgszywkbir\":\"tdhtmdvyp\"},\"tags\":{\"hkjoqr\":\"zh\",\"mfiibfggj\":\"qqaatjinrvgou\",\"rwxkvtkkgl\":\"ool\"}},\"id\":\"wjygvjayvblmhvk\",\"name\":\"uhbxvvy\",\"type\":\"gsopbyrqufegxu\"}") - .toObject(ComponentContainerInner.class); - Assertions.assertEquals("fq", model.properties().description()); - Assertions.assertEquals("tdhtmdvyp", model.properties().properties().get("ikdgszywkbir")); - Assertions.assertEquals("zh", model.properties().tags().get("hkjoqr")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerInner model = - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("fq") - .withProperties(mapOf("ikdgszywkbir", "tdhtmdvyp")) - .withTags(mapOf("hkjoqr", "zh", "mfiibfggj", "qqaatjinrvgou", "rwxkvtkkgl", "ool")) - .withIsArchived(true)); - model = BinaryData.fromObject(model).toObject(ComponentContainerInner.class); - Assertions.assertEquals("fq", model.properties().description()); - Assertions.assertEquals("tdhtmdvyp", model.properties().properties().get("ikdgszywkbir")); - Assertions.assertEquals("zh", model.properties().tags().get("hkjoqr")); - Assertions.assertEquals(true, model.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java deleted file mode 100644 index 7ac37197ded3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"bnhlmc\",\"nextVersion\":\"p\",\"description\":\"gitvg\",\"properties\":{\"rh\":\"rixkwmyijejve\",\"xexccbdreaxhcexd\":\"pna\"},\"tags\":{\"yjsvfyc\":\"qahqkghtpwijn\",\"fvoow\":\"z\",\"pyostronzmyhgfi\":\"rvmtgjq\"}}") - .toObject(ComponentContainerProperties.class); - Assertions.assertEquals("gitvg", model.description()); - Assertions.assertEquals("rixkwmyijejve", model.properties().get("rh")); - Assertions.assertEquals("qahqkghtpwijn", model.tags().get("yjsvfyc")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerProperties model = - new ComponentContainerProperties() - .withDescription("gitvg") - .withProperties(mapOf("rh", "rixkwmyijejve", "xexccbdreaxhcexd", "pna")) - .withTags(mapOf("yjsvfyc", "qahqkghtpwijn", "fvoow", "z", "pyostronzmyhgfi", "rvmtgjq")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ComponentContainerProperties.class); - Assertions.assertEquals("gitvg", model.description()); - Assertions.assertEquals("rixkwmyijejve", model.properties().get("rh")); - Assertions.assertEquals("qahqkghtpwijn", model.tags().get("yjsvfyc")); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index e0932d12bdfa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentContainerInner; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ho\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"phqamvdkfwynwcvt\",\"nextVersion\":\"kayh\",\"description\":\"nvyq\",\"properties\":{},\"tags\":{}},\"id\":\"zwpcnpwzcjaesg\",\"name\":\"v\",\"type\":\"ccyajg\"},{\"properties\":{\"isArchived\":true,\"latestVersion\":\"wygzlvdnkfxusem\",\"nextVersion\":\"zrmuhapfcqdps\",\"description\":\"qvpsvuoymg\",\"properties\":{},\"tags\":{}},\"id\":\"vezrypqlmfeo\",\"name\":\"erqwkyhkobopg\",\"type\":\"edkowepbqpcrfk\"}]}") - .toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ho", model.nextLink()); - Assertions.assertEquals("nvyq", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentContainerResourceArmPaginatedResult model = - new ComponentContainerResourceArmPaginatedResult() - .withNextLink("ho") - .withValue( - Arrays - .asList( - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("nvyq") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)), - new ComponentContainerInner() - .withProperties( - new ComponentContainerProperties() - .withDescription("qvpsvuoymg") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)))); - model = BinaryData.fromObject(model).toObject(ComponentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ho", model.nextLink()); - Assertions.assertEquals("nvyq", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index d358c3b29a3c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ComponentContainerProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"bpbokhmml\",\"nextVersion\":\"yarnggcjfwblqhxk\",\"description\":\"mcolmu\",\"properties\":{\"kluwz\":\"vaos\",\"nobguqisqsqkpdmi\":\"eygzvtyevjhu\",\"pnml\":\"y\"},\"tags\":{\"yrx\":\"cpszpmcvqdvrdmv\",\"mbtple\":\"hgvqojbxaotcgbz\"}},\"id\":\"ioyidoxznvg\",\"name\":\"dtmuuvd\",\"type\":\"wsxmrszb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = - manager - .componentContainers() - .define("wrdtnagzlgpy") - .withExistingWorkspace("avqdorbccqcd", "thojvlirknucos") - .withProperties( - new ComponentContainerProperties() - .withDescription("urgmcdcp") - .withProperties(mapOf("hyaaknyukibxiglh", "lojermhzicsbfd")) - .withTags(mapOf("tozyagjjnxkb", "wxqtejpiilh", "yxg", "lh", "cnvqeons", "fklvqzrwtrdg")) - .withIsArchived(true)) - .create(); - - Assertions.assertEquals("mcolmu", response.properties().description()); - Assertions.assertEquals("vaos", response.properties().properties().get("kluwz")); - Assertions.assertEquals("cpszpmcvqdvrdmv", response.properties().tags().get("yrx")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 6996fbb163cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .componentContainers() - .deleteWithResponse( - "tpuwnnohmmzngocf", "juypwyiulaynosu", "kfhaxttpfsmwgsgh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java deleted file mode 100644 index e4b1837836cc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"bzkuastaxklpr\",\"nextVersion\":\"l\",\"description\":\"l\",\"properties\":{\"yskye\":\"zwxvscksgf\",\"ckwrtw\":\"gafxczvf\"},\"tags\":{\"lhpdhwynctaczcnj\":\"yveszr\",\"x\":\"mbbfnv\",\"nkrtikl\":\"tzo\"}},\"id\":\"n\",\"name\":\"hql\",\"type\":\"oqksyiibhyxwbgbu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentContainer response = - manager - .componentContainers() - .getWithResponse("ucumlddauqml", "feothxu", "rigrjdljlkq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("l", response.properties().description()); - Assertions.assertEquals("zwxvscksgf", response.properties().properties().get("yskye")); - Assertions.assertEquals("yveszr", response.properties().tags().get("lhpdhwynctaczcnj")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java deleted file mode 100644 index 923a359e700b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentContainersListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"ncgagdvc\",\"nextVersion\":\"hftzbpyfao\",\"description\":\"f\",\"properties\":{\"rf\":\"ncwmhjob\",\"dc\":\"ri\",\"f\":\"h\",\"oorssatfy\":\"cvbzwgwhgkgsoa\"},\"tags\":{\"dqn\":\"ufdmxuq\",\"fqayopbtsix\":\"sttuxv\",\"jay\":\"gvbhxmndztgs\"}},\"id\":\"arxneibpgbr\",\"name\":\"bjdqkn\",\"type\":\"qnm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .componentContainers() - .list("f", "uz", "wjecooyvhtuqbpe", ListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("f", response.iterator().next().properties().description()); - Assertions.assertEquals("ncwmhjob", response.iterator().next().properties().properties().get("rf")); - Assertions.assertEquals("ufdmxuq", response.iterator().next().properties().tags().get("dqn")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java deleted file mode 100644 index b66999b28101..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionInnerTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"componentSpec\":\"datarnjwmw\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"zejjoqk\",\"properties\":{\"azpxdtnkdmkqjjl\":\"hsxttaugzxnf\",\"ou\":\"uenvrkp\",\"aays\":\"ibreb\"},\"tags\":{\"tezlwff\":\"xqtnq\",\"pqqmted\":\"iakp\"}},\"id\":\"mmji\",\"name\":\"yeozphvwauyqncy\",\"type\":\"upkvipmdsc\"}") - .toObject(ComponentVersionInner.class); - Assertions.assertEquals("zejjoqk", model.properties().description()); - Assertions.assertEquals("hsxttaugzxnf", model.properties().properties().get("azpxdtnkdmkqjjl")); - Assertions.assertEquals("xqtnq", model.properties().tags().get("tezlwff")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionInner model = - new ComponentVersionInner() - .withProperties( - new ComponentVersionProperties() - .withDescription("zejjoqk") - .withProperties(mapOf("azpxdtnkdmkqjjl", "hsxttaugzxnf", "ou", "uenvrkp", "aays", "ibreb")) - .withTags(mapOf("tezlwff", "xqtnq", "pqqmted", "iakp")) - .withIsAnonymous(true) - .withIsArchived(false) - .withComponentSpec("datarnjwmw")); - model = BinaryData.fromObject(model).toObject(ComponentVersionInner.class); - Assertions.assertEquals("zejjoqk", model.properties().description()); - Assertions.assertEquals("hsxttaugzxnf", model.properties().properties().get("azpxdtnkdmkqjjl")); - Assertions.assertEquals("xqtnq", model.properties().tags().get("tezlwff")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java deleted file mode 100644 index b9d87e131cd9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionPropertiesTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionProperties model = - BinaryData - .fromString( - "{\"componentSpec\":\"dataqupevzh\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"hojujbypelmcuv\",\"properties\":{\"fw\":\"bjx\",\"coolsttpkiwkkb\":\"yl\",\"fpncurdo\":\"ujrywvtyl\",\"cbihwqk\":\"wiithtywub\"},\"tags\":{\"dgoihxumwctondzj\":\"ntwjch\",\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\"}}") - .toObject(ComponentVersionProperties.class); - Assertions.assertEquals("hojujbypelmcuv", model.description()); - Assertions.assertEquals("bjx", model.properties().get("fw")); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionProperties model = - new ComponentVersionProperties() - .withDescription("hojujbypelmcuv") - .withProperties( - mapOf("fw", "bjx", "coolsttpkiwkkb", "yl", "fpncurdo", "ujrywvtyl", "cbihwqk", "wiithtywub")) - .withTags(mapOf("dgoihxumwctondzj", "ntwjch", "fdlwg", "uu", "gseinq", "ytsbwtovv")) - .withIsAnonymous(true) - .withIsArchived(false) - .withComponentSpec("dataqupevzh"); - model = BinaryData.fromObject(model).toObject(ComponentVersionProperties.class); - Assertions.assertEquals("hojujbypelmcuv", model.description()); - Assertions.assertEquals("bjx", model.properties().get("fw")); - Assertions.assertEquals("ntwjch", model.tags().get("dgoihxumwctondzj")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 7b0f86dc01c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComponentVersionInner; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ComponentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"sxkm\",\"value\":[{\"properties\":{\"componentSpec\":\"datakrrjrea\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"mhjglikkxwslolb\",\"properties\":{},\"tags\":{}},\"id\":\"zlmvfelfktgp\",\"name\":\"crpw\",\"type\":\"xeznoi\"}]}") - .toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("sxkm", model.nextLink()); - Assertions.assertEquals("mhjglikkxwslolb", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComponentVersionResourceArmPaginatedResult model = - new ComponentVersionResourceArmPaginatedResult() - .withNextLink("sxkm") - .withValue( - Arrays - .asList( - new ComponentVersionInner() - .withProperties( - new ComponentVersionProperties() - .withDescription("mhjglikkxwslolb") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(true) - .withComponentSpec("datakrrjrea")))); - model = BinaryData.fromObject(model).toObject(ComponentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("sxkm", model.nextLink()); - Assertions.assertEquals("mhjglikkxwslolb", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index f2df4fe9d91e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ComponentVersionProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"componentSpec\":\"dataudpabcreuwzos\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"vasormrexzvdubew\",\"properties\":{\"ovsdqhzrtdbakrli\":\"gbaduve\",\"ifjmclngygnh\":\"zfvppkeq\"},\"tags\":{\"oqtrotpvclpo\":\"mbcdtajdopggorw\",\"xjgvh\":\"yrlmwkptsk\",\"ookbpu\":\"ccbmkakm\",\"kmlwkt\":\"mgvmuy\"}},\"id\":\"wzkroyrdurxfl\",\"name\":\"qjimejtgzjxxlfej\",\"type\":\"zuqloiwyayyzivr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = - manager - .componentVersions() - .define("zkn") - .withExistingComponent("jzkcasfwzcntog", "fjwajnrt", "zvaqkifmxawost") - .withProperties( - new ComponentVersionProperties() - .withDescription("fnqqwyp") - .withProperties(mapOf("b", "r")) - .withTags(mapOf("wjfkainjmuym", "tggrss", "gmusaictdscnkzzo", "ecvztsc")) - .withIsAnonymous(false) - .withIsArchived(true) - .withComponentSpec("datakmjqncfvdsc")) - .create(); - - Assertions.assertEquals("vasormrexzvdubew", response.properties().description()); - Assertions.assertEquals("gbaduve", response.properties().properties().get("ovsdqhzrtdbakrli")); - Assertions.assertEquals("mbcdtajdopggorw", response.properties().tags().get("oqtrotpvclpo")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 2335daf835ca..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .componentVersions() - .deleteWithResponse( - "gdusxurs", "ivuxcjkcoqwczs", "iqrizfwihvaan", "qtnhjrfd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 35b5951185f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsGetWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"componentSpec\":\"datafkumcfjxoky\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"vfnkwmygjjekrk\",\"properties\":{\"rdtulcrcjdklotcs\":\"rugjqyckgtx\",\"zoonsv\":\"b\"},\"tags\":{\"nn\":\"hkxfpwhdyslbklgl\",\"xrid\":\"kwayqshwy\",\"aqjmkgxqwque\":\"tb\"}},\"id\":\"ylztp\",\"name\":\"iizevjykofvez\",\"type\":\"fkhkqtwqlep\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComponentVersion response = - manager - .componentVersions() - .getWithResponse( - "fdvbbaexxjfwtg", "fkkauigvmua", "mczfedyuepsvplt", "dajjvywe", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vfnkwmygjjekrk", response.properties().description()); - Assertions.assertEquals("rugjqyckgtx", response.properties().properties().get("rdtulcrcjdklotcs")); - Assertions.assertEquals("hkxfpwhdyslbklgl", response.properties().tags().get("nn")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java deleted file mode 100644 index ebfe28fbc2a3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComponentVersionsListMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComponentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComponentVersionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"componentSpec\":\"datask\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"ahzllrqmtlpb\",\"properties\":{\"noiicsu\":\"oiduyqypff\"},\"tags\":{\"oluqwgusxxhdo\":\"brjjtalxrdsjr\"}},\"id\":\"jwyblvtbdmvsb\",\"name\":\"idaelqpvekmkwjfb\",\"type\":\"tlo\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .componentVersions() - .list( - "nimx", - "pnerxrzut", - "lcurzaqmnbx", - "aehtd", - 2095580918, - "mbnvynfaooeacted", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ahzllrqmtlpb", response.iterator().next().properties().description()); - Assertions.assertEquals("oiduyqypff", response.iterator().next().properties().properties().get("noiicsu")); - Assertions.assertEquals("brjjtalxrdsjr", response.iterator().next().properties().tags().get("oluqwgusxxhdo")); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java deleted file mode 100644 index 353ba419fa06..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceApplicationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceApplication; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceApplicationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceApplication model = - BinaryData - .fromString("{\"displayName\":\"cyychunsjlp\",\"endpointUri\":\"twszhvvuic\"}") - .toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("cyychunsjlp", model.displayName()); - Assertions.assertEquals("twszhvvuic", model.endpointUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceApplication model = - new ComputeInstanceApplication().withDisplayName("cyychunsjlp").withEndpointUri("twszhvvuic"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceApplication.class); - Assertions.assertEquals("cyychunsjlp", model.displayName()); - Assertions.assertEquals("twszhvvuic", model.endpointUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java deleted file mode 100644 index e817919d853f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceConnectivityEndpointsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceConnectivityEndpoints; - -public final class ComputeInstanceConnectivityEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = - BinaryData - .fromString("{\"publicIpAddress\":\"vbrdfjmzsyzfho\",\"privateIpAddress\":\"h\"}") - .toObject(ComputeInstanceConnectivityEndpoints.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceConnectivityEndpoints model = new ComputeInstanceConnectivityEndpoints(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceConnectivityEndpoints.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java deleted file mode 100644 index 7fdfda816fde..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceContainerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Autosave; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceContainer; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import com.azure.resourcemanager.machinelearning.models.Network; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceContainer model = - BinaryData - .fromString( - "{\"name\":\"khvuhxepmrutz\",\"autosave\":\"Remote\",\"gpu\":\"obns\",\"network\":\"Host\",\"environment\":{\"name\":\"ltymkmvguihywart\",\"version\":\"phkixkykxdssjpe\"},\"services\":[\"datacfxhikkflrmy\"]}") - .toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("khvuhxepmrutz", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("obns", model.gpu()); - Assertions.assertEquals(Network.HOST, model.network()); - Assertions.assertEquals("ltymkmvguihywart", model.environment().name()); - Assertions.assertEquals("phkixkykxdssjpe", model.environment().version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceContainer model = - new ComputeInstanceContainer() - .withName("khvuhxepmrutz") - .withAutosave(Autosave.REMOTE) - .withGpu("obns") - .withNetwork(Network.HOST) - .withEnvironment( - new ComputeInstanceEnvironmentInfo().withName("ltymkmvguihywart").withVersion("phkixkykxdssjpe")); - model = BinaryData.fromObject(model).toObject(ComputeInstanceContainer.class); - Assertions.assertEquals("khvuhxepmrutz", model.name()); - Assertions.assertEquals(Autosave.REMOTE, model.autosave()); - Assertions.assertEquals("obns", model.gpu()); - Assertions.assertEquals(Network.HOST, model.network()); - Assertions.assertEquals("ltymkmvguihywart", model.environment().name()); - Assertions.assertEquals("phkixkykxdssjpe", model.environment().version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java deleted file mode 100644 index bb0dc3aac424..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceCreatedByTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceCreatedBy; - -public final class ComputeInstanceCreatedByTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceCreatedBy model = - BinaryData - .fromString( - "{\"userName\":\"vtrrmhwrbfdpyflu\",\"userOrgId\":\"vjglrocuyzlwhhme\",\"userId\":\"ooclutnp\"}") - .toObject(ComputeInstanceCreatedBy.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceCreatedBy model = new ComputeInstanceCreatedBy(); - model = BinaryData.fromObject(model).toObject(ComputeInstanceCreatedBy.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java deleted file mode 100644 index e59e9c32edd9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataDiskTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Caching; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataDisk; -import com.azure.resourcemanager.machinelearning.models.StorageAccountType; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataDiskTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataDisk model = - BinaryData - .fromString( - "{\"caching\":\"ReadWrite\",\"diskSizeGB\":264674589,\"lun\":753182470,\"storageAccountType\":\"Premium_LRS\"}") - .toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_WRITE, model.caching()); - Assertions.assertEquals(264674589, model.diskSizeGB()); - Assertions.assertEquals(753182470, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataDisk model = - new ComputeInstanceDataDisk() - .withCaching(Caching.READ_WRITE) - .withDiskSizeGB(264674589) - .withLun(753182470) - .withStorageAccountType(StorageAccountType.PREMIUM_LRS); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataDisk.class); - Assertions.assertEquals(Caching.READ_WRITE, model.caching()); - Assertions.assertEquals(264674589, model.diskSizeGB()); - Assertions.assertEquals(753182470, model.lun()); - Assertions.assertEquals(StorageAccountType.PREMIUM_LRS, model.storageAccountType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java deleted file mode 100644 index 5580c97a01ba..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceDataMountTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceDataMount; -import com.azure.resourcemanager.machinelearning.models.MountAction; -import com.azure.resourcemanager.machinelearning.models.MountState; -import com.azure.resourcemanager.machinelearning.models.SourceType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceDataMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceDataMount model = - BinaryData - .fromString( - "{\"source\":\"wlxte\",\"sourceType\":\"URI\",\"mountName\":\"jgwdtgukranbl\",\"mountAction\":\"Unmount\",\"createdBy\":\"lkccuzgygqwa\",\"mountPath\":\"iul\",\"mountState\":\"UnmountFailed\",\"mountedOn\":\"2021-09-27T01:24:26Z\",\"error\":\"rglvaw\"}") - .toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("wlxte", model.source()); - Assertions.assertEquals(SourceType.URI, model.sourceType()); - Assertions.assertEquals("jgwdtgukranbl", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("lkccuzgygqwa", model.createdBy()); - Assertions.assertEquals("iul", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNT_FAILED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T01:24:26Z"), model.mountedOn()); - Assertions.assertEquals("rglvaw", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceDataMount model = - new ComputeInstanceDataMount() - .withSource("wlxte") - .withSourceType(SourceType.URI) - .withMountName("jgwdtgukranbl") - .withMountAction(MountAction.UNMOUNT) - .withCreatedBy("lkccuzgygqwa") - .withMountPath("iul") - .withMountState(MountState.UNMOUNT_FAILED) - .withMountedOn(OffsetDateTime.parse("2021-09-27T01:24:26Z")) - .withError("rglvaw"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceDataMount.class); - Assertions.assertEquals("wlxte", model.source()); - Assertions.assertEquals(SourceType.URI, model.sourceType()); - Assertions.assertEquals("jgwdtgukranbl", model.mountName()); - Assertions.assertEquals(MountAction.UNMOUNT, model.mountAction()); - Assertions.assertEquals("lkccuzgygqwa", model.createdBy()); - Assertions.assertEquals("iul", model.mountPath()); - Assertions.assertEquals(MountState.UNMOUNT_FAILED, model.mountState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T01:24:26Z"), model.mountedOn()); - Assertions.assertEquals("rglvaw", model.error()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java deleted file mode 100644 index 17390ecdc9f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceEnvironmentInfoTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceEnvironmentInfo; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceEnvironmentInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceEnvironmentInfo model = - BinaryData - .fromString("{\"name\":\"incqlhriswsl\",\"version\":\"iiovgqcgxu\"}") - .toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("incqlhriswsl", model.name()); - Assertions.assertEquals("iiovgqcgxu", model.version()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceEnvironmentInfo model = - new ComputeInstanceEnvironmentInfo().withName("incqlhriswsl").withVersion("iiovgqcgxu"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceEnvironmentInfo.class); - Assertions.assertEquals("incqlhriswsl", model.name()); - Assertions.assertEquals("iiovgqcgxu", model.version()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java deleted file mode 100644 index 665d6aa9d183..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceLastOperationTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceLastOperation; -import com.azure.resourcemanager.machinelearning.models.OperationName; -import com.azure.resourcemanager.machinelearning.models.OperationStatus; -import com.azure.resourcemanager.machinelearning.models.OperationTrigger; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceLastOperationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceLastOperation model = - BinaryData - .fromString( - "{\"operationName\":\"Reimage\",\"operationTime\":\"2021-10-12T06:41:45Z\",\"operationStatus\":\"InProgress\",\"operationTrigger\":\"IdleShutdown\"}") - .toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.REIMAGE, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T06:41:45Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceLastOperation model = - new ComputeInstanceLastOperation() - .withOperationName(OperationName.REIMAGE) - .withOperationTime(OffsetDateTime.parse("2021-10-12T06:41:45Z")) - .withOperationStatus(OperationStatus.IN_PROGRESS) - .withOperationTrigger(OperationTrigger.IDLE_SHUTDOWN); - model = BinaryData.fromObject(model).toObject(ComputeInstanceLastOperation.class); - Assertions.assertEquals(OperationName.REIMAGE, model.operationName()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T06:41:45Z"), model.operationTime()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.operationStatus()); - Assertions.assertEquals(OperationTrigger.IDLE_SHUTDOWN, model.operationTrigger()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java deleted file mode 100644 index 4e09a116f0b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeInstanceVersionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputeInstanceVersion; -import org.junit.jupiter.api.Assertions; - -public final class ComputeInstanceVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeInstanceVersion model = - BinaryData.fromString("{\"runtime\":\"z\"}").toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("z", model.runtime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeInstanceVersion model = new ComputeInstanceVersion().withRuntime("z"); - model = BinaryData.fromObject(model).toObject(ComputeInstanceVersion.class); - Assertions.assertEquals("z", model.runtime()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java deleted file mode 100644 index 2e193135041f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceInnerTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.models.Compute; -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; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceInner model = - BinaryData - .fromString( - "{\"identity\":{\"principalId\":\"7fba71ed-02a3-4dcb-81fc-4ba57769d9aa\",\"tenantId\":\"e70fe5bc-d75a-4541-bc8f-32e7904dcaaf\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"idokgjlj\":{\"principalId\":\"94a7d9af-e519-4c92-87c2-8418a856bc2c\",\"clientId\":\"29eb96fc-b273-4899-963f-bd7b5e463024\"}}},\"location\":\"xgvcl\",\"tags\":{\"bijhtxfvgxbf\":\"sncghkjeszz\",\"ec\":\"mxnehmp\",\"gr\":\"godebfqkkrbmpu\"},\"sku\":{\"name\":\"flz\",\"tier\":\"Standard\",\"size\":\"zpuzycisp\",\"family\":\"zahmgkbrpyydhibn\",\"capacity\":2043148337},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"kadrgvt\",\"provisioningState\":\"Unknown\",\"description\":\"buynhijggm\",\"createdOn\":\"2021-03-31T00:28:57Z\",\"modifiedOn\":\"2021-01-01T18:17:26Z\",\"resourceId\":\"rbu\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"zzmhjrunmpxttd\",\"name\":\"hrbnlankxmyskpbh\",\"type\":\"nbtkcxywnytnr\"}") - .toObject(ComputeResourceInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xgvcl", model.location()); - Assertions.assertEquals("sncghkjeszz", model.tags().get("bijhtxfvgxbf")); - Assertions.assertEquals("flz", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("zpuzycisp", model.sku().size()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.sku().family()); - Assertions.assertEquals(2043148337, model.sku().capacity()); - Assertions.assertEquals("kadrgvt", model.properties().computeLocation()); - Assertions.assertEquals("buynhijggm", model.properties().description()); - Assertions.assertEquals("rbu", model.properties().resourceId()); - Assertions.assertEquals(true, model.properties().disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceInner model = - new ComputeResourceInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("idokgjlj", new UserAssignedIdentity()))) - .withLocation("xgvcl") - .withTags(mapOf("bijhtxfvgxbf", "sncghkjeszz", "ec", "mxnehmp", "gr", "godebfqkkrbmpu")) - .withSku( - new Sku() - .withName("flz") - .withTier(SkuTier.STANDARD) - .withSize("zpuzycisp") - .withFamily("zahmgkbrpyydhibn") - .withCapacity(2043148337)) - .withProperties( - new Compute() - .withComputeLocation("kadrgvt") - .withDescription("buynhijggm") - .withResourceId("rbu") - .withDisableLocalAuth(true)); - model = BinaryData.fromObject(model).toObject(ComputeResourceInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("xgvcl", model.location()); - Assertions.assertEquals("sncghkjeszz", model.tags().get("bijhtxfvgxbf")); - Assertions.assertEquals("flz", model.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.sku().tier()); - Assertions.assertEquals("zpuzycisp", model.sku().size()); - Assertions.assertEquals("zahmgkbrpyydhibn", model.sku().family()); - Assertions.assertEquals(2043148337, model.sku().capacity()); - Assertions.assertEquals("kadrgvt", model.properties().computeLocation()); - Assertions.assertEquals("buynhijggm", model.properties().description()); - Assertions.assertEquals("rbu", model.properties().resourceId()); - Assertions.assertEquals(true, model.properties().disableLocalAuth()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java deleted file mode 100644 index ace304817ef7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeResourceSchemaTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ComputeResourceSchema; -import org.junit.jupiter.api.Assertions; - -public final class ComputeResourceSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeResourceSchema model = - BinaryData - .fromString( - "{\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"lqidyby\",\"provisioningState\":\"Updating\",\"description\":\"clha\",\"createdOn\":\"2021-03-19T01:34:05Z\",\"modifiedOn\":\"2021-01-19T10:24:33Z\",\"resourceId\":\"p\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}}") - .toObject(ComputeResourceSchema.class); - Assertions.assertEquals("lqidyby", model.properties().computeLocation()); - Assertions.assertEquals("clha", model.properties().description()); - Assertions.assertEquals("p", model.properties().resourceId()); - Assertions.assertEquals(false, model.properties().disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeResourceSchema model = - new ComputeResourceSchema() - .withProperties( - new Compute() - .withComputeLocation("lqidyby") - .withDescription("clha") - .withResourceId("p") - .withDisableLocalAuth(false)); - model = BinaryData.fromObject(model).toObject(ComputeResourceSchema.class); - Assertions.assertEquals("lqidyby", model.properties().computeLocation()); - Assertions.assertEquals("clha", model.properties().description()); - Assertions.assertEquals("p", model.properties().resourceId()); - Assertions.assertEquals(false, model.properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.java deleted file mode 100644 index 95463915c506..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSchedulesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeSchedules; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import com.azure.resourcemanager.machinelearning.models.TriggerType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeSchedulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSchedules model = - BinaryData - .fromString( - "{\"computeStartStop\":[{\"id\":\"lxrzvhqjwtr\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":1941330764,\"endTime\":\"w\",\"startTime\":\"jsmwrokc\",\"timeZone\":\"fzzzwyjafitlhg\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"nuchlgmltxdwhmo\",\"endTime\":\"sgzv\",\"startTime\":\"snnjzfpafolpym\",\"timeZone\":\"mxq\"},\"schedule\":{\"id\":\"gpgdphtvdulaj\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Enabled\"}},{\"id\":\"csrlzknmzl\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":794571898,\"endTime\":\"q\",\"startTime\":\"jhmqrhvthla\",\"timeZone\":\"dcxsmlz\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"zdtxetlgyd\",\"endTime\":\"qvlnnpxybafiqgea\",\"startTime\":\"bgj\",\"timeZone\":\"glklb\"},\"schedule\":{\"id\":\"idwcwvmzegjon\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}},{\"id\":\"gdn\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Stop\",\"triggerType\":\"Cron\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Month\",\"interval\":1147399422,\"endTime\":\"sjcitdigsxc\",\"startTime\":\"l\",\"timeZone\":\"lkeuac\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"omflrytswfp\",\"endTime\":\"dgycxnmskwhqjjy\",\"startTime\":\"urlpshh\",\"timeZone\":\"pedwqsl\"},\"schedule\":{\"id\":\"mpqvwwsk\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}},{\"id\":\"wimuvqej\",\"provisioningStatus\":\"Failed\",\"status\":\"Disabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Week\",\"interval\":1658057009,\"endTime\":\"uqtljqobbpih\",\"startTime\":\"cecybmrqbrjbbmpx\",\"timeZone\":\"vykfrexcrse\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"jksghudg\",\"endTime\":\"xog\",\"startTime\":\"gsv\",\"timeZone\":\"jkxibda\"},\"schedule\":{\"id\":\"kmdyomkxfbvfbh\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}}]}") - .toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.START, model.computeStartStop().get(0).action()); - Assertions.assertEquals(TriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals("w", model.computeStartStop().get(0).recurrence().endTime()); - Assertions.assertEquals("jsmwrokc", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("fzzzwyjafitlhg", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(1941330764, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("sgzv", model.computeStartStop().get(0).cron().endTime()); - Assertions.assertEquals("snnjzfpafolpym", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("mxq", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("gpgdphtvdulaj", model.computeStartStop().get(0).schedule().id()); - Assertions - .assertEquals( - ScheduleProvisioningState.PROVISIONING, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSchedules model = - new ComputeSchedules() - .withComputeStartStop( - Arrays - .asList( - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("w") - .withStartTime("jsmwrokc") - .withTimeZone("fzzzwyjafitlhg") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(1941330764)) - .withCron( - new CronTrigger() - .withEndTime("sgzv") - .withStartTime("snnjzfpafolpym") - .withTimeZone("mxq") - .withExpression("nuchlgmltxdwhmo")) - .withSchedule( - new ScheduleBase() - .withId("gpgdphtvdulaj") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.ENABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("q") - .withStartTime("jhmqrhvthla") - .withTimeZone("dcxsmlz") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(794571898)) - .withCron( - new CronTrigger() - .withEndTime("qvlnnpxybafiqgea") - .withStartTime("bgj") - .withTimeZone("glklb") - .withExpression("zdtxetlgyd")) - .withSchedule( - new ScheduleBase() - .withId("idwcwvmzegjon") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.STOP) - .withTriggerType(TriggerType.CRON) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("sjcitdigsxc") - .withStartTime("l") - .withTimeZone("lkeuac") - .withFrequency(RecurrenceFrequency.MONTH) - .withInterval(1147399422)) - .withCron( - new CronTrigger() - .withEndTime("dgycxnmskwhqjjy") - .withStartTime("urlpshh") - .withTimeZone("pedwqsl") - .withExpression("omflrytswfp")) - .withSchedule( - new ScheduleBase() - .withId("mpqvwwsk") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED)), - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.DISABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.RECURRENCE) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("uqtljqobbpih") - .withStartTime("cecybmrqbrjbbmpx") - .withTimeZone("vykfrexcrse") - .withFrequency(RecurrenceFrequency.WEEK) - .withInterval(1658057009)) - .withCron( - new CronTrigger() - .withEndTime("xog") - .withStartTime("gsv") - .withTimeZone("jkxibda") - .withExpression("jksghudg")) - .withSchedule( - new ScheduleBase() - .withId("kmdyomkxfbvfbh") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED)))); - model = BinaryData.fromObject(model).toObject(ComputeSchedules.class); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.computeStartStop().get(0).status()); - Assertions.assertEquals(ComputePowerAction.START, model.computeStartStop().get(0).action()); - Assertions.assertEquals(TriggerType.CRON, model.computeStartStop().get(0).triggerType()); - Assertions.assertEquals("w", model.computeStartStop().get(0).recurrence().endTime()); - Assertions.assertEquals("jsmwrokc", model.computeStartStop().get(0).recurrence().startTime()); - Assertions.assertEquals("fzzzwyjafitlhg", model.computeStartStop().get(0).recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.computeStartStop().get(0).recurrence().frequency()); - Assertions.assertEquals(1941330764, model.computeStartStop().get(0).recurrence().interval()); - Assertions.assertEquals("sgzv", model.computeStartStop().get(0).cron().endTime()); - Assertions.assertEquals("snnjzfpafolpym", model.computeStartStop().get(0).cron().startTime()); - Assertions.assertEquals("mxq", model.computeStartStop().get(0).cron().timeZone()); - Assertions.assertEquals("nuchlgmltxdwhmo", model.computeStartStop().get(0).cron().expression()); - Assertions.assertEquals("gpgdphtvdulaj", model.computeStartStop().get(0).schedule().id()); - Assertions - .assertEquals( - ScheduleProvisioningState.PROVISIONING, - model.computeStartStop().get(0).schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.computeStartStop().get(0).schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java deleted file mode 100644 index d0d7dd931e67..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeSecretsInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeSecretsInner; - -public final class ComputeSecretsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeSecretsInner model = - BinaryData.fromString("{\"computeType\":\"ComputeSecrets\"}").toObject(ComputeSecretsInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeSecretsInner model = new ComputeSecretsInner(); - model = BinaryData.fromObject(model).toObject(ComputeSecretsInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java deleted file mode 100644 index 422af5e5d26e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeStartStopScheduleTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ComputePowerAction; -import com.azure.resourcemanager.machinelearning.models.ComputeStartStopSchedule; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import com.azure.resourcemanager.machinelearning.models.TriggerType; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ComputeStartStopScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ComputeStartStopSchedule model = - BinaryData - .fromString( - "{\"id\":\"wpg\",\"provisioningStatus\":\"Failed\",\"status\":\"Enabled\",\"action\":\"Start\",\"triggerType\":\"Recurrence\",\"recurrence\":{\"triggerType\":\"Recurrence\",\"frequency\":\"Day\",\"interval\":926595396,\"schedule\":{\"hours\":[1582308433],\"minutes\":[166613008],\"monthDays\":[587867611,1327364121],\"weekDays\":[\"Thursday\"]},\"endTime\":\"bwsnsqow\",\"startTime\":\"comlikytwvczc\",\"timeZone\":\"k\"},\"cron\":{\"triggerType\":\"Cron\",\"expression\":\"ve\",\"endTime\":\"fdv\",\"startTime\":\"hbwrnfxtgddpqth\",\"timeZone\":\"n\"},\"schedule\":{\"id\":\"oya\",\"provisioningStatus\":\"Provisioning\",\"status\":\"Disabled\"}}") - .toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(TriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals("bwsnsqow", model.recurrence().endTime()); - Assertions.assertEquals("comlikytwvczc", model.recurrence().startTime()); - Assertions.assertEquals("k", model.recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.recurrence().frequency()); - Assertions.assertEquals(926595396, model.recurrence().interval()); - Assertions.assertEquals(1582308433, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(166613008, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(587867611, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("fdv", model.cron().endTime()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.cron().startTime()); - Assertions.assertEquals("n", model.cron().timeZone()); - Assertions.assertEquals("ve", model.cron().expression()); - Assertions.assertEquals("oya", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.schedule().status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ComputeStartStopSchedule model = - new ComputeStartStopSchedule() - .withStatus(ScheduleStatus.ENABLED) - .withAction(ComputePowerAction.START) - .withTriggerType(TriggerType.RECURRENCE) - .withRecurrence( - new RecurrenceTrigger() - .withEndTime("bwsnsqow") - .withStartTime("comlikytwvczc") - .withTimeZone("k") - .withFrequency(RecurrenceFrequency.DAY) - .withInterval(926595396) - .withSchedule( - new RecurrenceSchedule() - .withHours(Arrays.asList(1582308433)) - .withMinutes(Arrays.asList(166613008)) - .withMonthDays(Arrays.asList(587867611, 1327364121)) - .withWeekDays(Arrays.asList(WeekDay.THURSDAY)))) - .withCron( - new CronTrigger() - .withEndTime("fdv") - .withStartTime("hbwrnfxtgddpqth") - .withTimeZone("n") - .withExpression("ve")) - .withSchedule( - new ScheduleBase() - .withId("oya") - .withProvisioningStatus(ScheduleProvisioningState.PROVISIONING) - .withStatus(ScheduleStatus.DISABLED)); - model = BinaryData.fromObject(model).toObject(ComputeStartStopSchedule.class); - Assertions.assertEquals(ScheduleStatus.ENABLED, model.status()); - Assertions.assertEquals(ComputePowerAction.START, model.action()); - Assertions.assertEquals(TriggerType.RECURRENCE, model.triggerType()); - Assertions.assertEquals("bwsnsqow", model.recurrence().endTime()); - Assertions.assertEquals("comlikytwvczc", model.recurrence().startTime()); - Assertions.assertEquals("k", model.recurrence().timeZone()); - Assertions.assertEquals(RecurrenceFrequency.DAY, model.recurrence().frequency()); - Assertions.assertEquals(926595396, model.recurrence().interval()); - Assertions.assertEquals(1582308433, model.recurrence().schedule().hours().get(0)); - Assertions.assertEquals(166613008, model.recurrence().schedule().minutes().get(0)); - Assertions.assertEquals(587867611, model.recurrence().schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.THURSDAY, model.recurrence().schedule().weekDays().get(0)); - Assertions.assertEquals("fdv", model.cron().endTime()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.cron().startTime()); - Assertions.assertEquals("n", model.cron().timeZone()); - Assertions.assertEquals("ve", model.cron().expression()); - Assertions.assertEquals("oya", model.schedule().id()); - Assertions.assertEquals(ScheduleProvisioningState.PROVISIONING, model.schedule().provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.schedule().status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java deleted file mode 100644 index 6d5820af1979..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputeTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Compute; -import org.junit.jupiter.api.Assertions; - -public final class ComputeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Compute model = - BinaryData - .fromString( - "{\"computeType\":\"Compute\",\"computeLocation\":\"tsthsucocm\",\"provisioningState\":\"Canceled\",\"description\":\"zt\",\"createdOn\":\"2021-04-09T08:14:29Z\",\"modifiedOn\":\"2021-08-28T10:19:16Z\",\"resourceId\":\"qpuedckzywbiex\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false}") - .toObject(Compute.class); - Assertions.assertEquals("tsthsucocm", model.computeLocation()); - Assertions.assertEquals("zt", model.description()); - Assertions.assertEquals("qpuedckzywbiex", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Compute model = - new Compute() - .withComputeLocation("tsthsucocm") - .withDescription("zt") - .withResourceId("qpuedckzywbiex") - .withDisableLocalAuth(false); - model = BinaryData.fromObject(model).toObject(Compute.class); - Assertions.assertEquals("tsthsucocm", model.computeLocation()); - Assertions.assertEquals("zt", model.description()); - Assertions.assertEquals("qpuedckzywbiex", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.java deleted file mode 100644 index 34735a5e7776..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesCreateOrUpdateMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -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 java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"identity\":{\"principalId\":\"1ee3bee0-6ff7-49e8-bb68-e00d27bcece0\",\"tenantId\":\"5cc048d8-79ef-4872-886f-a002e40a7489\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"nii\",\"tags\":{\"sjtgirnbgmgmddo\":\"vqban\"},\"sku\":{\"name\":\"mynltwmpftmfoeaj\",\"tier\":\"Standard\",\"size\":\"xwet\",\"family\":\"fddrvlkpzwbhnrec\",\"capacity\":252329651},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"muhkahm\",\"provisioningState\":\"Succeeded\",\"description\":\"iuc\",\"createdOn\":\"2021-02-05T06:18:58Z\",\"modifiedOn\":\"2021-09-23T11:37:53Z\",\"resourceId\":\"jpjbweunxcqr\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false},\"id\":\"hppiybx\",\"name\":\"gnzuzpbgkzcsc\",\"type\":\"iuzvkunhdimju\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeResource response = - manager - .computes() - .define("ojxrjnbsconxavi") - .withExistingWorkspace("mdafbgymqt", "apr") - .withRegion("izqfsgnwdxz") - .withTags(mapOf("rfbo", "q")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withSku( - new Sku() - .withName("ipmlnfyzavf") - .withTier(SkuTier.FREE) - .withSize("icdbkpdj") - .withFamily("qh") - .withCapacity(222903277)) - .withProperties( - new Compute() - .withComputeLocation("dgonjhxshthmgp") - .withDescription("lptkbvc") - .withResourceId("gqqbtimpk") - .withDisableLocalAuth(false)) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nii", response.location()); - Assertions.assertEquals("vqban", response.tags().get("sjtgirnbgmgmddo")); - Assertions.assertEquals("mynltwmpftmfoeaj", response.sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, response.sku().tier()); - Assertions.assertEquals("xwet", response.sku().size()); - Assertions.assertEquals("fddrvlkpzwbhnrec", response.sku().family()); - Assertions.assertEquals(252329651, response.sku().capacity()); - Assertions.assertEquals("muhkahm", response.properties().computeLocation()); - Assertions.assertEquals("iuc", response.properties().description()); - Assertions.assertEquals("jpjbweunxcqr", response.properties().resourceId()); - Assertions.assertEquals(false, response.properties().disableLocalAuth()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java deleted file mode 100644 index 08eeb0e3f577..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesDeleteMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.UnderlyingResourceAction; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .computes() - .delete( - "tlqh", "pxouvmr", "iflikyypzkgxfx", UnderlyingResourceAction.DETACH, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java deleted file mode 100644 index ed6becf3e9e7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesGetWithResponseMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"identity\":{\"principalId\":\"1de443a3-f608-425f-91bd-438d47ec26d7\",\"tenantId\":\"e37f22c1-6b70-4a8c-8d5a-d0815df251d2\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"kgd\",\"tags\":{\"qsktxqf\":\"krukizyhgsqt\",\"cgbfzuscstun\":\"jbqggweeiwdhdm\",\"bkl\":\"lhxd\",\"f\":\"iichgjsysmvxodgw\"},\"sku\":{\"name\":\"sifcuvbdujgc\",\"tier\":\"Free\",\"size\":\"cbbwjtrdxriz\",\"family\":\"bbgiarksykpgdqxw\",\"capacity\":230334707},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"qrxhaclcdos\",\"provisioningState\":\"Creating\",\"description\":\"jqgkifmmainwhe\",\"createdOn\":\"2021-07-02T12:23:07Z\",\"modifiedOn\":\"2021-11-29T01:34:21Z\",\"resourceId\":\"wuntobuiz\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"vydjufbnk\",\"name\":\"blaxpegj\",\"type\":\"dabalfdxaglzfytl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeResource response = - manager - .computes() - .getWithResponse("xampqcr", "g", "uqxbpiatwfauje", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("kgd", response.location()); - Assertions.assertEquals("krukizyhgsqt", response.tags().get("qsktxqf")); - Assertions.assertEquals("sifcuvbdujgc", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("cbbwjtrdxriz", response.sku().size()); - Assertions.assertEquals("bbgiarksykpgdqxw", response.sku().family()); - Assertions.assertEquals(230334707, response.sku().capacity()); - Assertions.assertEquals("qrxhaclcdos", response.properties().computeLocation()); - Assertions.assertEquals("jqgkifmmainwhe", response.properties().description()); - Assertions.assertEquals("wuntobuiz", response.properties().resourceId()); - Assertions.assertEquals(true, response.properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java deleted file mode 100644 index cdf7973f9436..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListKeysWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeSecrets; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesListKeysWithResponseMockTests { - @Test - public void testListKeysWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"computeType\":\"ComputeSecrets\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ComputeSecrets response = - manager - .computes() - .listKeysWithResponse("lilw", "ghjhjvmabzzbwa", "b", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java deleted file mode 100644 index 31b5b2dd45c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ComputeResource; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"identity\":{\"principalId\":\"0be36eb6-1866-4b48-9c68-496f7e78e9dd\",\"tenantId\":\"3db7bdd0-a243-4495-af5a-9360ec87f65c\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"ujmoi\",\"tags\":{\"jslkyozdsfzjue\":\"wemhdee\",\"jtv\":\"rhrhtsl\",\"xvgjbfi\":\"j\",\"bj\":\"bpnjodf\"},\"sku\":{\"name\":\"wmtqsmoxsaz\",\"tier\":\"Basic\",\"size\":\"gwecywnfysz\",\"family\":\"czs\",\"capacity\":57372147},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"ddbboz\",\"provisioningState\":\"Deleting\",\"description\":\"mkjmyitrchwudlxe\",\"createdOn\":\"2021-07-21T06:48:48Z\",\"modifiedOn\":\"2021-01-08T01:59:39Z\",\"resourceId\":\"noejhqlfmsibz\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true},\"id\":\"ydpmypgfqvmt\",\"name\":\"whlakxpejpew\",\"type\":\"yjl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.computes().list("zb", "yqjoghdsa", "djanormo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.iterator().next().identity().type()); - Assertions.assertEquals("ujmoi", response.iterator().next().location()); - Assertions.assertEquals("wemhdee", response.iterator().next().tags().get("jslkyozdsfzjue")); - Assertions.assertEquals("wmtqsmoxsaz", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.iterator().next().sku().tier()); - Assertions.assertEquals("gwecywnfysz", response.iterator().next().sku().size()); - Assertions.assertEquals("czs", response.iterator().next().sku().family()); - Assertions.assertEquals(57372147, response.iterator().next().sku().capacity()); - Assertions.assertEquals("ddbboz", response.iterator().next().properties().computeLocation()); - Assertions.assertEquals("mkjmyitrchwudlxe", response.iterator().next().properties().description()); - Assertions.assertEquals("noejhqlfmsibz", response.iterator().next().properties().resourceId()); - Assertions.assertEquals(true, response.iterator().next().properties().disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java deleted file mode 100644 index 72ba2b3c739f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ComputesListNodesMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlComputeNodeInformation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ComputesListNodesMockTests { - @Test - public void testListNodes() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nodes\":[{\"nodeId\":\"skw\",\"privateIpAddress\":\"sdetjygowifcqpol\",\"publicIpAddress\":\"gysdgzyyb\",\"port\":375628920,\"nodeState\":\"running\",\"runId\":\"cptvdxxheig\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.computes().listNodes("yrqsdbpokszanm", "wgpterdiuw", "i", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java deleted file mode 100644 index 1f0d2cfe906e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceRequirementsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceRequirements; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceRequirementsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceRequirements model = - BinaryData - .fromString( - "{\"containerResourceLimits\":{\"cpu\":\"wllcolsr\",\"gpu\":\"apte\",\"memory\":\"excgjokjljnhvl\"},\"containerResourceRequests\":{\"cpu\":\"ek\",\"gpu\":\"eksnbksdqhjvyk\",\"memory\":\"eslk\"}}") - .toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("wllcolsr", model.containerResourceLimits().cpu()); - Assertions.assertEquals("apte", model.containerResourceLimits().gpu()); - Assertions.assertEquals("excgjokjljnhvl", model.containerResourceLimits().memory()); - Assertions.assertEquals("ek", model.containerResourceRequests().cpu()); - Assertions.assertEquals("eksnbksdqhjvyk", model.containerResourceRequests().gpu()); - Assertions.assertEquals("eslk", model.containerResourceRequests().memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceRequirements model = - new ContainerResourceRequirements() - .withContainerResourceLimits( - new ContainerResourceSettings().withCpu("wllcolsr").withGpu("apte").withMemory("excgjokjljnhvl")) - .withContainerResourceRequests( - new ContainerResourceSettings().withCpu("ek").withGpu("eksnbksdqhjvyk").withMemory("eslk")); - model = BinaryData.fromObject(model).toObject(ContainerResourceRequirements.class); - Assertions.assertEquals("wllcolsr", model.containerResourceLimits().cpu()); - Assertions.assertEquals("apte", model.containerResourceLimits().gpu()); - Assertions.assertEquals("excgjokjljnhvl", model.containerResourceLimits().memory()); - Assertions.assertEquals("ek", model.containerResourceRequests().cpu()); - Assertions.assertEquals("eksnbksdqhjvyk", model.containerResourceRequests().gpu()); - Assertions.assertEquals("eslk", model.containerResourceRequests().memory()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java deleted file mode 100644 index 430c11d570d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ContainerResourceSettingsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerResourceSettings; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResourceSettings model = - BinaryData - .fromString("{\"cpu\":\"ustcpoq\",\"gpu\":\"vnwqjwgo\",\"memory\":\"lejjjkxy\"}") - .toObject(ContainerResourceSettings.class); - Assertions.assertEquals("ustcpoq", model.cpu()); - Assertions.assertEquals("vnwqjwgo", model.gpu()); - Assertions.assertEquals("lejjjkxy", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResourceSettings model = - new ContainerResourceSettings().withCpu("ustcpoq").withGpu("vnwqjwgo").withMemory("lejjjkxy"); - model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class); - Assertions.assertEquals("ustcpoq", model.cpu()); - Assertions.assertEquals("vnwqjwgo", model.gpu()); - Assertions.assertEquals("lejjjkxy", model.memory()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java deleted file mode 100644 index eb119224d22a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CosmosDbSettingsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import org.junit.jupiter.api.Assertions; - -public final class CosmosDbSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CosmosDbSettings model = - BinaryData.fromString("{\"collectionsThroughput\":1098993569}").toObject(CosmosDbSettings.class); - Assertions.assertEquals(1098993569, model.collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1098993569); - model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class); - Assertions.assertEquals(1098993569, model.collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java deleted file mode 100644 index 946de8b11fec..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CronTriggerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CronTrigger; -import org.junit.jupiter.api.Assertions; - -public final class CronTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CronTrigger model = - BinaryData - .fromString( - "{\"triggerType\":\"Cron\",\"expression\":\"ksrl\",\"endTime\":\"desqplpvmjcdo\",\"startTime\":\"bidyv\",\"timeZone\":\"owx\"}") - .toObject(CronTrigger.class); - Assertions.assertEquals("desqplpvmjcdo", model.endTime()); - Assertions.assertEquals("bidyv", model.startTime()); - Assertions.assertEquals("owx", model.timeZone()); - Assertions.assertEquals("ksrl", model.expression()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CronTrigger model = - new CronTrigger() - .withEndTime("desqplpvmjcdo") - .withStartTime("bidyv") - .withTimeZone("owx") - .withExpression("ksrl"); - model = BinaryData.fromObject(model).toObject(CronTrigger.class); - Assertions.assertEquals("desqplpvmjcdo", model.endTime()); - Assertions.assertEquals("bidyv", model.startTime()); - Assertions.assertEquals("owx", model.timeZone()); - Assertions.assertEquals("ksrl", model.expression()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java deleted file mode 100644 index 0204d2f8ca62..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomForecastHorizonTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomForecastHorizon; -import org.junit.jupiter.api.Assertions; - -public final class CustomForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomForecastHorizon model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":632851650}").toObject(CustomForecastHorizon.class); - Assertions.assertEquals(632851650, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomForecastHorizon model = new CustomForecastHorizon().withValue(632851650); - model = BinaryData.fromObject(model).toObject(CustomForecastHorizon.class); - Assertions.assertEquals(632851650, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java deleted file mode 100644 index e397e628a6a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobInputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobInput; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"custom_model\",\"mode\":\"Direct\",\"uri\":\"bkjbz\",\"description\":\"nsvk\"}") - .toObject(CustomModelJobInput.class); - Assertions.assertEquals("nsvk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("bkjbz", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobInput model = - new CustomModelJobInput().withDescription("nsvk").withMode(InputDeliveryMode.DIRECT).withUri("bkjbz"); - model = BinaryData.fromObject(model).toObject(CustomModelJobInput.class); - Assertions.assertEquals("nsvk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("bkjbz", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java deleted file mode 100644 index af669e82b1c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomModelJobOutputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class CustomModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"custom_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"tjknsxfwushcdp\",\"description\":\"pn\"}") - .toObject(CustomModelJobOutput.class); - Assertions.assertEquals("pn", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("tjknsxfwushcdp", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomModelJobOutput model = - new CustomModelJobOutput() - .withDescription("pn") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("tjknsxfwushcdp"); - model = BinaryData.fromObject(model).toObject(CustomModelJobOutput.class); - Assertions.assertEquals("pn", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("tjknsxfwushcdp", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java deleted file mode 100644 index 07b772a2ac82..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomNCrossValidationsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomNCrossValidations; -import org.junit.jupiter.api.Assertions; - -public final class CustomNCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomNCrossValidations model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":691698964}").toObject(CustomNCrossValidations.class); - Assertions.assertEquals(691698964, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomNCrossValidations model = new CustomNCrossValidations().withValue(691698964); - model = BinaryData.fromObject(model).toObject(CustomNCrossValidations.class); - Assertions.assertEquals(691698964, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java deleted file mode 100644 index 8f1caf6d5790..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomSeasonalityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomSeasonality; -import org.junit.jupiter.api.Assertions; - -public final class CustomSeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomSeasonality model = - BinaryData.fromString("{\"mode\":\"Custom\",\"value\":1578351643}").toObject(CustomSeasonality.class); - Assertions.assertEquals(1578351643, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomSeasonality model = new CustomSeasonality().withValue(1578351643); - model = BinaryData.fromObject(model).toObject(CustomSeasonality.class); - Assertions.assertEquals(1578351643, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java deleted file mode 100644 index b6cfdaad5bdf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetLagsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetLags; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetLags model = - BinaryData - .fromString("{\"mode\":\"Custom\",\"values\":[915823701,1407190218,425904374]}") - .toObject(CustomTargetLags.class); - Assertions.assertEquals(915823701, model.values().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetLags model = new CustomTargetLags().withValues(Arrays.asList(915823701, 1407190218, 425904374)); - model = BinaryData.fromObject(model).toObject(CustomTargetLags.class); - Assertions.assertEquals(915823701, model.values().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java deleted file mode 100644 index 6af5bc3d6957..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/CustomTargetRollingWindowSizeTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CustomTargetRollingWindowSize; -import org.junit.jupiter.api.Assertions; - -public final class CustomTargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomTargetRollingWindowSize model = - BinaryData - .fromString("{\"mode\":\"Custom\",\"value\":482115950}") - .toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(482115950, model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomTargetRollingWindowSize model = new CustomTargetRollingWindowSize().withValue(482115950); - model = BinaryData.fromObject(model).toObject(CustomTargetRollingWindowSize.class); - Assertions.assertEquals(482115950, model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java deleted file mode 100644 index 80d46d356747..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerInnerTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":true,\"latestVersion\":\"ycnunvjsrtk\",\"nextVersion\":\"wnopqgikyzirtx\",\"description\":\"uxzejntpsew\",\"properties\":{\"rydxtqm\":\"ilqu\"},\"tags\":{\"f\":\"xorgg\"}},\"id\":\"aomtbghhavgrvkff\",\"name\":\"vjzhpjbib\",\"type\":\"jmfxumvf\"}") - .toObject(DataContainerInner.class); - Assertions.assertEquals("uxzejntpsew", model.properties().description()); - Assertions.assertEquals("ilqu", model.properties().properties().get("rydxtqm")); - Assertions.assertEquals("xorgg", model.properties().tags().get("f")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerInner model = - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("uxzejntpsew") - .withProperties(mapOf("rydxtqm", "ilqu")) - .withTags(mapOf("f", "xorgg")) - .withIsArchived(true) - .withDataType(DataType.URI_FOLDER)); - model = BinaryData.fromObject(model).toObject(DataContainerInner.class); - Assertions.assertEquals("uxzejntpsew", model.properties().description()); - Assertions.assertEquals("ilqu", model.properties().properties().get("rydxtqm")); - Assertions.assertEquals("xorgg", model.properties().tags().get("f")); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FOLDER, model.properties().dataType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java deleted file mode 100644 index 2b0434e60be5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerPropertiesTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerProperties model = - BinaryData - .fromString( - "{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"vwxnbkfe\",\"nextVersion\":\"xscyhwzdgirujbz\",\"description\":\"mvzzbtdcqvp\",\"properties\":{\"n\":\"ujviylwdshfs\",\"rymsgaojfmw\":\"bgye\",\"hirctymoxoftpipi\":\"cotmr\",\"lihhyuspskasdvlm\":\"yczuhxacpq\"},\"tags\":{\"ulucv\":\"gz\",\"urisjnhnytxifqj\":\"amrsreuzv\",\"esutrgjupauutpw\":\"gxmrhublwp\",\"jqgwzp\":\"qhih\"}}") - .toObject(DataContainerProperties.class); - Assertions.assertEquals("mvzzbtdcqvp", model.description()); - Assertions.assertEquals("ujviylwdshfs", model.properties().get("n")); - Assertions.assertEquals("gz", model.tags().get("ulucv")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(DataType.MLTABLE, model.dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerProperties model = - new DataContainerProperties() - .withDescription("mvzzbtdcqvp") - .withProperties( - mapOf( - "n", - "ujviylwdshfs", - "rymsgaojfmw", - "bgye", - "hirctymoxoftpipi", - "cotmr", - "lihhyuspskasdvlm", - "yczuhxacpq")) - .withTags( - mapOf( - "ulucv", - "gz", - "urisjnhnytxifqj", - "amrsreuzv", - "esutrgjupauutpw", - "gxmrhublwp", - "jqgwzp", - "qhih")) - .withIsArchived(false) - .withDataType(DataType.MLTABLE); - model = BinaryData.fromObject(model).toObject(DataContainerProperties.class); - Assertions.assertEquals("mvzzbtdcqvp", model.description()); - Assertions.assertEquals("ujviylwdshfs", model.properties().get("n")); - Assertions.assertEquals("gz", model.tags().get("ulucv")); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(DataType.MLTABLE, model.dataType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index a4e0717beafe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainerResourceArmPaginatedResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataContainerInner; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataContainerResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ufxqknpirgnepttw\",\"value\":[{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":true,\"latestVersion\":\"cdm\",\"nextVersion\":\"r\",\"description\":\"lpijnkrxfrd\",\"properties\":{},\"tags\":{}},\"id\":\"atiz\",\"name\":\"ronasxift\",\"type\":\"zq\"},{\"properties\":{\"dataType\":\"uri_folder\",\"isArchived\":false,\"latestVersion\":\"wesgogczh\",\"nextVersion\":\"nxkrlgnyhmossxkk\",\"description\":\"h\",\"properties\":{},\"tags\":{}},\"id\":\"xjb\",\"name\":\"hqxvcxgfrpdsofbs\",\"type\":\"rnsvbuswd\"}]}") - .toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ufxqknpirgnepttw", model.nextLink()); - Assertions.assertEquals("lpijnkrxfrd", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataContainerResourceArmPaginatedResult model = - new DataContainerResourceArmPaginatedResult() - .withNextLink("ufxqknpirgnepttw") - .withValue( - Arrays - .asList( - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("lpijnkrxfrd") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true) - .withDataType(DataType.URI_FILE)), - new DataContainerInner() - .withProperties( - new DataContainerProperties() - .withDescription("h") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)))); - model = BinaryData.fromObject(model).toObject(DataContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("ufxqknpirgnepttw", model.nextLink()); - Assertions.assertEquals("lpijnkrxfrd", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, model.value().get(0).properties().dataType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c21fbede1d46..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataContainerProperties; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"kc\",\"nextVersion\":\"gzkj\",\"description\":\"qpdwad\",\"properties\":{\"qymjzucwwmejjqhd\":\"ztldsvczdjiah\"},\"tags\":{\"yfozkbnzxbypfqp\":\"mqxiyoo\",\"r\":\"aix\"}},\"id\":\"kkderfrswq\",\"name\":\"kwepwo\",\"type\":\"ggicwnxhtfmcqbs\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = - manager - .dataContainers() - .define("yizwbxgdebxla") - .withExistingWorkspace("ddtgctxegtvgwy", "rbelfnzz") - .withProperties( - new DataContainerProperties() - .withDescription("cpjs") - .withProperties( - mapOf("cucsqsnxfbxu", "em", "su", "eapdrbzyv", "hmhjd", "dulpodkaxpfobk", "eluqr", "lt")) - .withTags(mapOf("srkgz", "dhfztlra", "dbkuwpzqxlcwe", "yh", "qufqizj", "kfecjvxf")) - .withIsArchived(false) - .withDataType(DataType.URI_FOLDER)) - .create(); - - Assertions.assertEquals("qpdwad", response.properties().description()); - Assertions.assertEquals("ztldsvczdjiah", response.properties().properties().get("qymjzucwwmejjqhd")); - Assertions.assertEquals("mqxiyoo", response.properties().tags().get("yfozkbnzxbypfqp")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.properties().dataType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 3db0566ca853..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.dataContainers().deleteWithResponse("zx", "kn", "fdrld", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.java deleted file mode 100644 index 49bf49716b24..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersGetWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataType\":\"uri_file\",\"isArchived\":false,\"latestVersion\":\"zcsozjvxdz\",\"nextVersion\":\"ggbnvtxo\",\"description\":\"alzyxwhoeamo\",\"properties\":{\"fpnimtwuuhaueg\":\"doey\",\"zjy\":\"kwmnfeub\"},\"tags\":{\"nqd\":\"fugiphrrkuu\",\"opueo\":\"rhzz\"}},\"id\":\"svwlujop\",\"name\":\"nibittoztjdqumq\",\"type\":\"fmwc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataContainer response = - manager - .dataContainers() - .getWithResponse("yehi", "ittugyu", "wrldax", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("alzyxwhoeamo", response.properties().description()); - Assertions.assertEquals("doey", response.properties().properties().get("fpnimtwuuhaueg")); - Assertions.assertEquals("fugiphrrkuu", response.properties().tags().get("nqd")); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(DataType.URI_FILE, response.properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java deleted file mode 100644 index de0d56c7ab37..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataContainersListMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataContainer; -import com.azure.resourcemanager.machinelearning.models.DataType; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"dataType\":\"mltable\",\"isArchived\":false,\"latestVersion\":\"yeyzm\",\"nextVersion\":\"sqc\",\"description\":\"nxlzbuwodmach\",\"properties\":{\"rmvgoqplehmumkz\":\"nrpb\",\"prwnhkgqggoxsst\":\"llcz\",\"cwmhlymgnukxrk\":\"ivrakfrryn\"},\"tags\":{\"clakku\":\"pequlrlzaudgjtf\",\"toucgj\":\"ddwnhczb\",\"slvlizedvb\":\"irjwayhicqqwwvgw\",\"srgekzyqxadyfhb\":\"abv\"}},\"id\":\"khojqttbspvk\",\"name\":\"glaqjsg\",\"type\":\"zstuj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .dataContainers() - .list( - "itcdqlhchwhrk", - "jlei", - "ibfiplhxfnsm", - ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nxlzbuwodmach", response.iterator().next().properties().description()); - Assertions.assertEquals("nrpb", response.iterator().next().properties().properties().get("rmvgoqplehmumkz")); - Assertions.assertEquals("pequlrlzaudgjtf", response.iterator().next().properties().tags().get("clakku")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - Assertions.assertEquals(DataType.MLTABLE, response.iterator().next().properties().dataType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java deleted file mode 100644 index d24b30e51dd2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataFactoryTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataFactory; -import org.junit.jupiter.api.Assertions; - -public final class DataFactoryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataFactory model = - BinaryData - .fromString( - "{\"computeType\":\"DataFactory\",\"computeLocation\":\"anurnnqb\",\"provisioningState\":\"Unknown\",\"description\":\"izxqltgrd\",\"createdOn\":\"2021-08-08T02:29:28Z\",\"modifiedOn\":\"2021-03-28T12:05:51Z\",\"resourceId\":\"x\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}") - .toObject(DataFactory.class); - Assertions.assertEquals("anurnnqb", model.computeLocation()); - Assertions.assertEquals("izxqltgrd", model.description()); - Assertions.assertEquals("x", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataFactory model = - new DataFactory() - .withComputeLocation("anurnnqb") - .withDescription("izxqltgrd") - .withResourceId("x") - .withDisableLocalAuth(false); - model = BinaryData.fromObject(model).toObject(DataFactory.class); - Assertions.assertEquals("anurnnqb", model.computeLocation()); - Assertions.assertEquals("izxqltgrd", model.description()); - Assertions.assertEquals("x", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java deleted file mode 100644 index dd2067f2876c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = - BinaryData - .fromString("{\"dataLakeStoreAccountName\":\"b\"}") - .toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("b", model.dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchemaProperties model = - new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("b"); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchemaProperties.class); - Assertions.assertEquals("b", model.dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java deleted file mode 100644 index 5529cf53c492..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsSchemaTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchema; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalyticsSchema model = - BinaryData - .fromString("{\"properties\":{\"dataLakeStoreAccountName\":\"mg\"}}") - .toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("mg", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalyticsSchema model = - new DataLakeAnalyticsSchema() - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("mg")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalyticsSchema.class); - Assertions.assertEquals("mg", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java deleted file mode 100644 index 3f98d4cf05ae..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataLakeAnalyticsTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalytics; -import com.azure.resourcemanager.machinelearning.models.DataLakeAnalyticsSchemaProperties; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeAnalyticsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeAnalytics model = - BinaryData - .fromString( - "{\"computeType\":\"DataLakeAnalytics\",\"properties\":{\"dataLakeStoreAccountName\":\"wrxaomzisg\"},\"computeLocation\":\"rczezkhhlt\",\"provisioningState\":\"Deleting\",\"description\":\"hqo\",\"createdOn\":\"2021-11-21T17:40:44Z\",\"modifiedOn\":\"2021-08-05T21:29:34Z\",\"resourceId\":\"ueayfbpcmsplb\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":true}") - .toObject(DataLakeAnalytics.class); - Assertions.assertEquals("rczezkhhlt", model.computeLocation()); - Assertions.assertEquals("hqo", model.description()); - Assertions.assertEquals("ueayfbpcmsplb", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("wrxaomzisg", model.properties().dataLakeStoreAccountName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeAnalytics model = - new DataLakeAnalytics() - .withComputeLocation("rczezkhhlt") - .withDescription("hqo") - .withResourceId("ueayfbpcmsplb") - .withDisableLocalAuth(true) - .withProperties(new DataLakeAnalyticsSchemaProperties().withDataLakeStoreAccountName("wrxaomzisg")); - model = BinaryData.fromObject(model).toObject(DataLakeAnalytics.class); - Assertions.assertEquals("rczezkhhlt", model.computeLocation()); - Assertions.assertEquals("hqo", model.description()); - Assertions.assertEquals("ueayfbpcmsplb", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("wrxaomzisg", model.properties().dataLakeStoreAccountName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java deleted file mode 100644 index 88749f1779a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataPathAssetReferenceTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class DataPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataPathAssetReference model = - BinaryData - .fromString( - "{\"referenceType\":\"DataPath\",\"datastoreId\":\"uwxeoiojfizf\",\"path\":\"kjzwfbcyayk\"}") - .toObject(DataPathAssetReference.class); - Assertions.assertEquals("uwxeoiojfizf", model.datastoreId()); - Assertions.assertEquals("kjzwfbcyayk", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataPathAssetReference model = - new DataPathAssetReference().withDatastoreId("uwxeoiojfizf").withPath("kjzwfbcyayk"); - model = BinaryData.fromObject(model).toObject(DataPathAssetReference.class); - Assertions.assertEquals("uwxeoiojfizf", model.datastoreId()); - Assertions.assertEquals("kjzwfbcyayk", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java deleted file mode 100644 index 33fbb9af6925..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseInnerTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"vpkjpr\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"ql\",\"properties\":{\"dshmkxmaehvbbx\":\"gtczheydb\"},\"tags\":{\"kgxywr\":\"pltfnhtba\"}},\"id\":\"pyklyhpluodpvru\",\"name\":\"dlgzibthostgkt\",\"type\":\"tvdxeclzedqb\"}") - .toObject(DataVersionBaseInner.class); - Assertions.assertEquals("ql", model.properties().description()); - Assertions.assertEquals("gtczheydb", model.properties().properties().get("dshmkxmaehvbbx")); - Assertions.assertEquals("pltfnhtba", model.properties().tags().get("kgxywr")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("vpkjpr", model.properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseInner model = - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("ql") - .withProperties(mapOf("dshmkxmaehvbbx", "gtczheydb")) - .withTags(mapOf("kgxywr", "pltfnhtba")) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("vpkjpr")); - model = BinaryData.fromObject(model).toObject(DataVersionBaseInner.class); - Assertions.assertEquals("ql", model.properties().description()); - Assertions.assertEquals("gtczheydb", model.properties().properties().get("dshmkxmaehvbbx")); - Assertions.assertEquals("pltfnhtba", model.properties().tags().get("kgxywr")); - Assertions.assertEquals(true, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("vpkjpr", model.properties().dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java deleted file mode 100644 index 4067e2dd1721..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBasePropertiesTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseProperties model = - BinaryData - .fromString( - "{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"vh\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"dqkdlwwqfbu\",\"properties\":{\"lmbtxhwgfwsrt\":\"xtrqjfs\",\"kh\":\"wcoezbrhub\"},\"tags\":{\"kkqfqjbvle\":\"goo\"}}") - .toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("xtrqjfs", model.properties().get("lmbtxhwgfwsrt")); - Assertions.assertEquals("goo", model.tags().get("kkqfqjbvle")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("vh", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseProperties model = - new DataVersionBaseProperties() - .withDescription("dqkdlwwqfbu") - .withProperties(mapOf("lmbtxhwgfwsrt", "xtrqjfs", "kh", "wcoezbrhub")) - .withTags(mapOf("kkqfqjbvle", "goo")) - .withIsAnonymous(false) - .withIsArchived(true) - .withDataUri("vh"); - model = BinaryData.fromObject(model).toObject(DataVersionBaseProperties.class); - Assertions.assertEquals("dqkdlwwqfbu", model.description()); - Assertions.assertEquals("xtrqjfs", model.properties().get("lmbtxhwgfwsrt")); - Assertions.assertEquals("goo", model.tags().get("kkqfqjbvle")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("vh", model.dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index c498cc1b9ac6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionBaseResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DataVersionBaseInner; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DataVersionBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"qntcypsxjvfoimwk\",\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"rcizjxvyd\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"lhvygdyftu\",\"properties\":{},\"tags\":{}},\"id\":\"nawjslbiwkojgcy\",\"name\":\"tsf\",\"type\":\"z\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"baeqphc\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"pxehuwrykqga\",\"properties\":{},\"tags\":{}},\"id\":\"iklbydvkhb\",\"name\":\"jdz\",\"type\":\"xcv\"},{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"srhnjivo\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"qfzgemjdftul\",\"properties\":{},\"tags\":{}},\"id\":\"ucea\",\"name\":\"tmczuomejwcwwqi\",\"type\":\"knssxmojm\"}]}") - .toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.nextLink()); - Assertions.assertEquals("lhvygdyftu", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataVersionBaseResourceArmPaginatedResult model = - new DataVersionBaseResourceArmPaginatedResult() - .withNextLink("qntcypsxjvfoimwk") - .withValue( - Arrays - .asList( - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("lhvygdyftu") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("rcizjxvyd")), - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("pxehuwrykqga") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("baeqphc")), - new DataVersionBaseInner() - .withProperties( - new DataVersionBaseProperties() - .withDescription("qfzgemjdftul") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("srhnjivo")))); - model = BinaryData.fromObject(model).toObject(DataVersionBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("qntcypsxjvfoimwk", model.nextLink()); - Assertions.assertEquals("lhvygdyftu", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("rcizjxvyd", model.value().get(0).properties().dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 627299b201b6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.DataVersionBaseProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"sx\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"orimmo\",\"properties\":{\"kkmvhzfovanyrva\":\"de\",\"ewikfyaqandmym\":\"rtgelg\"},\"tags\":{\"bpbvzopaxmf\":\"qjumovs\",\"faxdtnqifbsa\":\"vsmcwo\"}},\"id\":\"oiauesugmocpcj\",\"name\":\"cboe\",\"type\":\"rgttw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = - manager - .dataVersions() - .define("qich") - .withExistingData("vdhgjnaqyqip", "lzmvcdsvmwbi", "ekdtfobvfiyb") - .withProperties( - new DataVersionBaseProperties() - .withDescription("ulrqtbht") - .withProperties(mapOf("ryfmxmdu", "pzl", "giln", "zf")) - .withTags( - mapOf( - "qqyeqfcb", - "ccgndjgdprig", - "fsh", - "ulpyuflq", - "klkqnqvkixnmb", - "ujcyohigimwdc", - "zayspzvriet", - "mecuyrzwim")) - .withIsAnonymous(true) - .withIsArchived(true) - .withDataUri("ybfzdqekivycp")) - .create(); - - Assertions.assertEquals("orimmo", response.properties().description()); - Assertions.assertEquals("de", response.properties().properties().get("kkmvhzfovanyrva")); - Assertions.assertEquals("qjumovs", response.properties().tags().get("bpbvzopaxmf")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("sx", response.properties().dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index fe4af1524ea9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .dataVersions() - .deleteWithResponse( - "qrxqwqnjx", "dfddtullygtav", "zcxdfweapyfmlxrl", "phraspifleim", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.java deleted file mode 100644 index 32ac248ee912..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsGetWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"mtznpaxwfqtyyqi\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"ngbso\",\"properties\":{\"zbkuckgkdsksw\":\"kmii\",\"woykdnonaaxwm\":\"iiqqcqikclsmalns\"},\"tags\":{\"q\":\"ujlqcwnynlle\"}},\"id\":\"bgvsbtsertoxadh\",\"name\":\"uvjhxmnrqstjc\",\"type\":\"etwmlgicvnp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataVersionBase response = - manager - .dataVersions() - .getWithResponse("x", "mdbgi", "ehfgsm", "rjuqbpxtokl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ngbso", response.properties().description()); - Assertions.assertEquals("kmii", response.properties().properties().get("zbkuckgkdsksw")); - Assertions.assertEquals("ujlqcwnynlle", response.properties().tags().get("q")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("mtznpaxwfqtyyqi", response.properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java deleted file mode 100644 index f5a6b45c3561..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DataVersionsListMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.DataVersionBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataVersionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"dataType\":\"DataVersionBaseProperties\",\"dataUri\":\"pjyyqmkwlhvc\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"jk\",\"properties\":{\"uzmsxgam\":\"xrwzo\"},\"tags\":{\"j\":\"kwppthuzdprmimr\",\"xyemhkft\":\"poq\",\"tecloamfmxtll\":\"aew\"}},\"id\":\"tymqcnrrfijhggab\",\"name\":\"bgamklilirwd\",\"type\":\"ffhsdpzouhk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .dataVersions() - .list( - "d", - "pgchzpgfqum", - "djxh", - "ghgodkynrceq", - 233157705, - "fdbdfmmxj", - "naj", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jk", response.iterator().next().properties().description()); - Assertions.assertEquals("xrwzo", response.iterator().next().properties().properties().get("uzmsxgam")); - Assertions.assertEquals("kwppthuzdprmimr", response.iterator().next().properties().tags().get("j")); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("pjyyqmkwlhvc", response.iterator().next().properties().dataUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java deleted file mode 100644 index 3716ec3a07fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoreResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DatastoreInner; -import com.azure.resourcemanager.machinelearning.models.DatastoreProperties; -import com.azure.resourcemanager.machinelearning.models.DatastoreResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DatastoreResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatastoreResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"fmluiqtqzfavyvn\",\"value\":[{\"properties\":{\"datastoreType\":\"DatastoreProperties\",\"isDefault\":false,\"description\":\"yeua\",\"properties\":{},\"tags\":{}},\"id\":\"abqgzslesjcbh\",\"name\":\"rnntiewdjcv\",\"type\":\"quwrbehwag\"}]}") - .toObject(DatastoreResourceArmPaginatedResult.class); - Assertions.assertEquals("fmluiqtqzfavyvn", model.nextLink()); - Assertions.assertEquals("yeua", model.value().get(0).properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatastoreResourceArmPaginatedResult model = - new DatastoreResourceArmPaginatedResult() - .withNextLink("fmluiqtqzfavyvn") - .withValue( - Arrays - .asList( - new DatastoreInner() - .withProperties( - new DatastoreProperties() - .withDescription("yeua") - .withProperties(mapOf()) - .withTags(mapOf())))); - model = BinaryData.fromObject(model).toObject(DatastoreResourceArmPaginatedResult.class); - Assertions.assertEquals("fmluiqtqzfavyvn", model.nextLink()); - Assertions.assertEquals("yeua", model.value().get(0).properties().description()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java deleted file mode 100644 index 0fdbce8dfb9d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DatastoresDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DatastoresDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .datastores() - .deleteWithResponse("bp", "nupoyryefqmwovyz", "xlnomfpbjcee", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java deleted file mode 100644 index 6aebf34094fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DefaultScaleSettingsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DefaultScaleSettings; - -public final class DefaultScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultScaleSettings model = - BinaryData.fromString("{\"scaleType\":\"Default\"}").toObject(DefaultScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultScaleSettings model = new DefaultScaleSettings(); - model = BinaryData.fromObject(model).toObject(DefaultScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java deleted file mode 100644 index 97597fc5b2a1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.DeploymentLogsInner; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsInner model = - BinaryData.fromString("{\"content\":\"jcxcjxgrytfmpcyc\"}").toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jcxcjxgrytfmpcyc", model.content()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsInner model = new DeploymentLogsInner().withContent("jcxcjxgrytfmpcyc"); - model = BinaryData.fromObject(model).toObject(DeploymentLogsInner.class); - Assertions.assertEquals("jcxcjxgrytfmpcyc", model.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java deleted file mode 100644 index 82ee2e9d4bd4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentLogsRequestTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentLogsRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentLogsRequest model = - BinaryData - .fromString("{\"containerType\":\"StorageInitializer\",\"tail\":304740778}") - .toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.STORAGE_INITIALIZER, model.containerType()); - Assertions.assertEquals(304740778, model.tail()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentLogsRequest model = - new DeploymentLogsRequest().withContainerType(ContainerType.STORAGE_INITIALIZER).withTail(304740778); - model = BinaryData.fromObject(model).toObject(DeploymentLogsRequest.class); - Assertions.assertEquals(ContainerType.STORAGE_INITIALIZER, model.containerType()); - Assertions.assertEquals(304740778, model.tail()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java deleted file mode 100644 index ec591bc0c0ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DeploymentResourceConfigurationTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DeploymentResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DeploymentResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DeploymentResourceConfiguration model = - BinaryData - .fromString( - "{\"instanceCount\":1806206586,\"instanceType\":\"dcfhucqdpf\",\"properties\":{\"vudutncor\":\"datalsbjjcanvxbv\",\"xqtvcofu\":\"datar\"}}") - .toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1806206586, model.instanceCount()); - Assertions.assertEquals("dcfhucqdpf", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DeploymentResourceConfiguration model = - new DeploymentResourceConfiguration() - .withInstanceCount(1806206586) - .withInstanceType("dcfhucqdpf") - .withProperties(mapOf("vudutncor", "datalsbjjcanvxbv", "xqtvcofu", "datar")); - model = BinaryData.fromObject(model).toObject(DeploymentResourceConfiguration.class); - Assertions.assertEquals(1806206586, model.instanceCount()); - Assertions.assertEquals("dcfhucqdpf", model.instanceType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java deleted file mode 100644 index 79a8c8e05466..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/DistributionConfigurationTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.DistributionConfiguration; - -public final class DistributionConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DistributionConfiguration model = - BinaryData - .fromString("{\"distributionType\":\"DistributionConfiguration\"}") - .toObject(DistributionConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DistributionConfiguration model = new DistributionConfiguration(); - model = BinaryData.fromObject(model).toObject(DistributionConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java deleted file mode 100644 index 48a697c830af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EarlyTerminationPolicyTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import org.junit.jupiter.api.Assertions; - -public final class EarlyTerminationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EarlyTerminationPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1491450827,\"evaluationInterval\":935954000}") - .toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1491450827, model.delayEvaluation()); - Assertions.assertEquals(935954000, model.evaluationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EarlyTerminationPolicy model = - new EarlyTerminationPolicy().withDelayEvaluation(1491450827).withEvaluationInterval(935954000); - model = BinaryData.fromObject(model).toObject(EarlyTerminationPolicy.class); - Assertions.assertEquals(1491450827, model.delayEvaluation()); - Assertions.assertEquals(935954000, model.evaluationInterval()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java deleted file mode 100644 index b2079ae77443..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EndpointScheduleActionTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EndpointScheduleAction; - -public final class EndpointScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EndpointScheduleAction model = - BinaryData - .fromString("{\"actionType\":\"InvokeBatchEndpoint\",\"endpointInvocationDefinition\":\"datamfzsbf\"}") - .toObject(EndpointScheduleAction.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EndpointScheduleAction model = new EndpointScheduleAction().withEndpointInvocationDefinition("datamfzsbf"); - model = BinaryData.fromObject(model).toObject(EndpointScheduleAction.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java deleted file mode 100644 index 876683c15f20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerInnerTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"ulfgslqu\",\"nextVersion\":\"wdlenrdsut\",\"description\":\"bazpjuohmi\",\"properties\":{\"wpklvxw\":\"lnorwmdu\",\"epn\":\"ygdxpgpqchis\",\"fozauorsuk\":\"bjcrxgibbdaxco\"},\"tags\":{\"vnuuepzl\":\"bqplh\",\"vmnnrw\":\"phwzsoldweyuqdu\"}},\"id\":\"i\",\"name\":\"rk\",\"type\":\"alywjhhgdn\"}") - .toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("bazpjuohmi", model.properties().description()); - Assertions.assertEquals("lnorwmdu", model.properties().properties().get("wpklvxw")); - Assertions.assertEquals("bqplh", model.properties().tags().get("vnuuepzl")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerInner model = - new EnvironmentContainerInner() - .withProperties( - new EnvironmentContainerProperties() - .withDescription("bazpjuohmi") - .withProperties( - mapOf("wpklvxw", "lnorwmdu", "epn", "ygdxpgpqchis", "fozauorsuk", "bjcrxgibbdaxco")) - .withTags(mapOf("vnuuepzl", "bqplh", "vmnnrw", "phwzsoldweyuqdu")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerInner.class); - Assertions.assertEquals("bazpjuohmi", model.properties().description()); - Assertions.assertEquals("lnorwmdu", model.properties().properties().get("wpklvxw")); - Assertions.assertEquals("bqplh", model.properties().tags().get("vnuuepzl")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java deleted file mode 100644 index db15e9292cee..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerPropertiesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"ivfomiloxgg\",\"nextVersion\":\"fi\",\"description\":\"dieuzaofj\",\"properties\":{\"ubiipuipwoqonma\":\"cyyysfgdot\"},\"tags\":{\"izsh\":\"k\"}}") - .toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("dieuzaofj", model.description()); - Assertions.assertEquals("cyyysfgdot", model.properties().get("ubiipuipwoqonma")); - Assertions.assertEquals("k", model.tags().get("izsh")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerProperties model = - new EnvironmentContainerProperties() - .withDescription("dieuzaofj") - .withProperties(mapOf("ubiipuipwoqonma", "cyyysfgdot")) - .withTags(mapOf("izsh", "k")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerProperties.class); - Assertions.assertEquals("dieuzaofj", model.description()); - Assertions.assertEquals("cyyysfgdot", model.properties().get("ubiipuipwoqonma")); - Assertions.assertEquals("k", model.tags().get("izsh")); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index f52bf87e95c9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentContainerInner; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"buffkmrqemvvhm\",\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"utacoe\",\"nextVersion\":\"vewzcj\",\"description\":\"m\",\"properties\":{},\"tags\":{}},\"id\":\"guaadraufactkahz\",\"name\":\"v\",\"type\":\"jjziuxxpsh\"}]}") - .toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("buffkmrqemvvhm", model.nextLink()); - Assertions.assertEquals("m", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentContainerResourceArmPaginatedResult model = - new EnvironmentContainerResourceArmPaginatedResult() - .withNextLink("buffkmrqemvvhm") - .withValue( - Arrays - .asList( - new EnvironmentContainerInner() - .withProperties( - new EnvironmentContainerProperties() - .withDescription("m") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(true)))); - model = BinaryData.fromObject(model).toObject(EnvironmentContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("buffkmrqemvvhm", model.nextLink()); - Assertions.assertEquals("m", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 2b0670da2c8b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainerProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"jenvjeateaxx\",\"nextVersion\":\"xoxdjxldnaryyi\",\"description\":\"kd\",\"properties\":{\"zaledoyqxlunkf\":\"ndwdbvx\",\"oanpohrvm\":\"hmcxqqxmyzkl\",\"a\":\"rqra\",\"k\":\"ivznllas\"},\"tags\":{\"aihxjtgzgtaiywbq\":\"jqjpv\",\"mhljqlxspm\":\"roigbsfsgsaenwld\"}},\"id\":\"ctr\",\"name\":\"ldsxebuhsxrz\",\"type\":\"mgsdaluyckhefrbh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = - manager - .environmentContainers() - .define("vsolzwil") - .withExistingWorkspace("dofuckclb", "xlu") - .withProperties( - new EnvironmentContainerProperties() - .withDescription("dkktpmbmxbmbrwgz") - .withProperties(mapOf("hxsdplaumydmhwe", "jb", "xydgtokvqbvwg", "jf", "lhpses", "gwzpvxak")) - .withTags( - mapOf( - "goqg", - "amqiydvxcgdhy", - "spglq", - "oyqyxyjrcbqpb", - "tdahneaoovtyjzti", - "o", - "ekfsrm", - "fwjlof")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("kd", response.properties().description()); - Assertions.assertEquals("ndwdbvx", response.properties().properties().get("zaledoyqxlunkf")); - Assertions.assertEquals("jqjpv", response.properties().tags().get("aihxjtgzgtaiywbq")); - Assertions.assertEquals(false, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java deleted file mode 100644 index 4fe0f354d62e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .environmentContainers() - .deleteWithResponse("d", "fa", "rptvcshtkutzcttb", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java deleted file mode 100644 index b4f4b37be1a2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"jirmuydgfttm\",\"nextVersion\":\"fgeoagfuoftnx\",\"description\":\"wxmdaj\",\"properties\":{\"gsevmdm\":\"g\",\"zljdnci\":\"enlrstgf\"},\"tags\":{\"cvucgytoxu\":\"vamyyznmrgcdo\",\"qmebgszplusdekpd\":\"httnzqs\",\"ssgpgvo\":\"z\",\"cwztlvvws\":\"yejidbdqzsqun\"}},\"id\":\"rkky\",\"name\":\"trepw\",\"type\":\"wfkcauxuvavcpf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentContainer response = - manager - .environmentContainers() - .getWithResponse("gdirda", "m", "zjgcfjfx", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wxmdaj", response.properties().description()); - Assertions.assertEquals("g", response.properties().properties().get("gsevmdm")); - Assertions.assertEquals("vamyyznmrgcdo", response.properties().tags().get("cvucgytoxu")); - Assertions.assertEquals(false, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java deleted file mode 100644 index 8be28b3cf8d3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentContainersListMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.EnvironmentContainer; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"isArchived\":false,\"latestVersion\":\"ipsdudgcozzomehx\",\"nextVersion\":\"ntolamlb\",\"description\":\"uxkqllczipvwdt\",\"properties\":{\"kwx\":\"zdqiqdlrat\",\"lhpryjfzihuio\":\"auwxsuykznhrfgsl\",\"pajtfeyvkbd\":\"eo\",\"rhd\":\"dd\"},\"tags\":{\"zytijcx\":\"beuuqutkzwtjwwg\",\"qkkkbjuckcatuqbh\":\"nondegjdyd\"}},\"id\":\"wcnxtpzdlyseid\",\"name\":\"oa\",\"type\":\"atprytgrhzbq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .environmentContainers() - .list( - "ddnvovbooqbmdq", - "xyglaetscflw", - "jdtlriefooyycux", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uxkqllczipvwdt", response.iterator().next().properties().description()); - Assertions.assertEquals("zdqiqdlrat", response.iterator().next().properties().properties().get("kwx")); - Assertions.assertEquals("beuuqutkzwtjwwg", response.iterator().next().properties().tags().get("zytijcx")); - Assertions.assertEquals(false, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java deleted file mode 100644 index a0f3ff3557bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionInnerTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"vizqzdwl\",\"dockerfilePath\":\"lyoupfgfbkju\"},\"condaFile\":\"yhgk\",\"environmentType\":\"Curated\",\"image\":\"sgow\",\"inferenceConfig\":{},\"osType\":\"Linux\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"bqactxtgzukx\",\"properties\":{\"tg\":\"m\",\"isavok\":\"qqxhrnxrxcpj\",\"azivjlfrqttbajl\":\"dzf\"},\"tags\":{\"dkqqfkuvscxkd\":\"nwxyiop\",\"oaz\":\"ligovibrxkpm\"}},\"id\":\"u\",\"name\":\"cbgoor\",\"type\":\"te\"}") - .toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("bqactxtgzukx", model.properties().description()); - Assertions.assertEquals("m", model.properties().properties().get("tg")); - Assertions.assertEquals("nwxyiop", model.properties().tags().get("dkqqfkuvscxkd")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("vizqzdwl", model.properties().build().contextUri()); - Assertions.assertEquals("lyoupfgfbkju", model.properties().build().dockerfilePath()); - Assertions.assertEquals("yhgk", model.properties().condaFile()); - Assertions.assertEquals("sgow", model.properties().image()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionInner model = - new EnvironmentVersionInner() - .withProperties( - new EnvironmentVersionProperties() - .withDescription("bqactxtgzukx") - .withProperties(mapOf("tg", "m", "isavok", "qqxhrnxrxcpj", "azivjlfrqttbajl", "dzf")) - .withTags(mapOf("dkqqfkuvscxkd", "nwxyiop", "oaz", "ligovibrxkpm")) - .withIsAnonymous(false) - .withIsArchived(true) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("vizqzdwl").withDockerfilePath("lyoupfgfbkju")) - .withCondaFile("yhgk") - .withImage("sgow") - .withInferenceConfig(new InferenceContainerProperties()) - .withOsType(OperatingSystemType.LINUX)); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionInner.class); - Assertions.assertEquals("bqactxtgzukx", model.properties().description()); - Assertions.assertEquals("m", model.properties().properties().get("tg")); - Assertions.assertEquals("nwxyiop", model.properties().tags().get("dkqqfkuvscxkd")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(true, model.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.properties().autoRebuild()); - Assertions.assertEquals("vizqzdwl", model.properties().build().contextUri()); - Assertions.assertEquals("lyoupfgfbkju", model.properties().build().dockerfilePath()); - Assertions.assertEquals("yhgk", model.properties().condaFile()); - Assertions.assertEquals("sgow", model.properties().image()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.properties().osType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.java deleted file mode 100644 index 8e545095d697..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionPropertiesTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import com.azure.resourcemanager.machinelearning.models.Route; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionProperties model = - BinaryData - .fromString( - "{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"hjxa\",\"dockerfilePath\":\"vjgsl\"},\"condaFile\":\"dilmyww\",\"environmentType\":\"UserCreated\",\"image\":\"xnyed\",\"inferenceConfig\":{\"livenessRoute\":{\"path\":\"yvudtjuewbci\",\"port\":1871891438},\"readinessRoute\":{\"path\":\"uwhcjyxccybv\",\"port\":436827826},\"scoringRoute\":{\"path\":\"akkud\",\"port\":417091375}},\"osType\":\"Linux\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"agst\",\"properties\":{\"gsj\":\"hpfkyrkdbdgi\",\"obaiyhddviaceg\":\"mnwqj\",\"ntfpmvmemfnc\":\"n\",\"xlllchp\":\"dwvvba\"},\"tags\":{\"jcswsmys\":\"zevwrdnhfukuv\",\"lerchpq\":\"uluqypfc\"}}") - .toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("agst", model.description()); - Assertions.assertEquals("hpfkyrkdbdgi", model.properties().get("gsj")); - Assertions.assertEquals("zevwrdnhfukuv", model.tags().get("jcswsmys")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.autoRebuild()); - Assertions.assertEquals("hjxa", model.build().contextUri()); - Assertions.assertEquals("vjgsl", model.build().dockerfilePath()); - Assertions.assertEquals("dilmyww", model.condaFile()); - Assertions.assertEquals("xnyed", model.image()); - Assertions.assertEquals("yvudtjuewbci", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1871891438, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("uwhcjyxccybv", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(436827826, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("akkud", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(417091375, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionProperties model = - new EnvironmentVersionProperties() - .withDescription("agst") - .withProperties( - mapOf("gsj", "hpfkyrkdbdgi", "obaiyhddviaceg", "mnwqj", "ntfpmvmemfnc", "n", "xlllchp", "dwvvba")) - .withTags(mapOf("jcswsmys", "zevwrdnhfukuv", "lerchpq", "uluqypfc")) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("hjxa").withDockerfilePath("vjgsl")) - .withCondaFile("dilmyww") - .withImage("xnyed") - .withInferenceConfig( - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("yvudtjuewbci").withPort(1871891438)) - .withReadinessRoute(new Route().withPath("uwhcjyxccybv").withPort(436827826)) - .withScoringRoute(new Route().withPath("akkud").withPort(417091375))) - .withOsType(OperatingSystemType.LINUX); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionProperties.class); - Assertions.assertEquals("agst", model.description()); - Assertions.assertEquals("hpfkyrkdbdgi", model.properties().get("gsj")); - Assertions.assertEquals("zevwrdnhfukuv", model.tags().get("jcswsmys")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, model.autoRebuild()); - Assertions.assertEquals("hjxa", model.build().contextUri()); - Assertions.assertEquals("vjgsl", model.build().dockerfilePath()); - Assertions.assertEquals("dilmyww", model.condaFile()); - Assertions.assertEquals("xnyed", model.image()); - Assertions.assertEquals("yvudtjuewbci", model.inferenceConfig().livenessRoute().path()); - Assertions.assertEquals(1871891438, model.inferenceConfig().livenessRoute().port()); - Assertions.assertEquals("uwhcjyxccybv", model.inferenceConfig().readinessRoute().path()); - Assertions.assertEquals(436827826, model.inferenceConfig().readinessRoute().port()); - Assertions.assertEquals("akkud", model.inferenceConfig().scoringRoute().path()); - Assertions.assertEquals(417091375, model.inferenceConfig().scoringRoute().port()); - Assertions.assertEquals(OperatingSystemType.LINUX, model.osType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index 7d0ac414f67a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.EnvironmentVersionInner; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"cimpevfg\",\"value\":[{\"properties\":{\"autoRebuild\":\"Disabled\",\"condaFile\":\"bywdxsmicc\",\"environmentType\":\"Curated\",\"image\":\"scjfnyns\",\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"qytibyowbblgyavu\",\"properties\":{},\"tags\":{}},\"id\":\"joxoism\",\"name\":\"ksbpimlqoljx\",\"type\":\"cgxxlxs\"}]}") - .toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("cimpevfg", model.nextLink()); - Assertions.assertEquals("qytibyowbblgyavu", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("bywdxsmicc", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("scjfnyns", model.value().get(0).properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVersionResourceArmPaginatedResult model = - new EnvironmentVersionResourceArmPaginatedResult() - .withNextLink("cimpevfg") - .withValue( - Arrays - .asList( - new EnvironmentVersionInner() - .withProperties( - new EnvironmentVersionProperties() - .withDescription("qytibyowbblgyavu") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.DISABLED) - .withCondaFile("bywdxsmicc") - .withImage("scjfnyns") - .withOsType(OperatingSystemType.WINDOWS)))); - model = BinaryData.fromObject(model).toObject(EnvironmentVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("cimpevfg", model.nextLink()); - Assertions.assertEquals("qytibyowbblgyavu", model.value().get(0).properties().description()); - Assertions.assertEquals(true, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.DISABLED, model.value().get(0).properties().autoRebuild()); - Assertions.assertEquals("bywdxsmicc", model.value().get(0).properties().condaFile()); - Assertions.assertEquals("scjfnyns", model.value().get(0).properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, model.value().get(0).properties().osType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 301d807f7f9c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.BuildContext; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersionProperties; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"bkfukdljq\",\"dockerfilePath\":\"tsdyds\"},\"condaFile\":\"pafyalo\",\"environmentType\":\"Curated\",\"image\":\"izzn\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"fyjfd\",\"properties\":{\"qh\":\"yvndjokgwesym\",\"ujqbbgsimwejl\":\"qpfzlpejtznxlue\",\"bcpr\":\"bkbpjzobd\"},\"tags\":{\"awp\":\"kuhydtnaczkfwfat\"}},\"id\":\"skivdwgtqcu\",\"name\":\"ecsaaqgoqbdiu\",\"type\":\"csbskowkrbh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = - manager - .environmentVersions() - .define("wrqkza") - .withExistingEnvironment("h", "gsiqikvllr", "tpmglxkoikmtr") - .withProperties( - new EnvironmentVersionProperties() - .withDescription("sbvvdlsflxkqesdf") - .withProperties(mapOf("dklt", "bgzancoinmphymcq", "toj", "dhqnufbxweiib")) - .withTags( - mapOf( - "uaorhjk", - "nybydhuihaouwud", - "amqprlo", - "hwvumosqir", - "zcmtagelajdyolj", - "rugejcvjkjy", - "qfmzsizzhravrc", - "qy")) - .withIsAnonymous(true) - .withIsArchived(false) - .withAutoRebuild(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE) - .withBuild(new BuildContext().withContextUri("mpa").withDockerfilePath("wzlweeprn")) - .withCondaFile("zltkaszfj") - .withImage("bduxapgrcq") - .withInferenceConfig(new InferenceContainerProperties()) - .withOsType(OperatingSystemType.WINDOWS)) - .create(); - - Assertions.assertEquals("fyjfd", response.properties().description()); - Assertions.assertEquals("yvndjokgwesym", response.properties().properties().get("qh")); - Assertions.assertEquals("kuhydtnaczkfwfat", response.properties().tags().get("awp")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("bkfukdljq", response.properties().build().contextUri()); - Assertions.assertEquals("tsdyds", response.properties().build().dockerfilePath()); - Assertions.assertEquals("pafyalo", response.properties().condaFile()); - Assertions.assertEquals("izzn", response.properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index 59dc400d4ad1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .environmentVersions() - .deleteWithResponse("hpyvdkgdet", "z", "canzb", "ekwuyckyvn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java deleted file mode 100644 index 9af7a5f2564e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"siecktybhj\",\"dockerfilePath\":\"idhhxomild\"},\"condaFile\":\"jxdugxwj\",\"environmentType\":\"Curated\",\"image\":\"qrslaate\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"wlxrhgt\",\"properties\":{\"korvvm\":\"tqqykbkkteozejog\",\"h\":\"mcofn\"},\"tags\":{\"li\":\"nosn\",\"z\":\"k\",\"etyalht\":\"j\",\"ttcucrcm\":\"mknazgbjbhrpgiq\"}},\"id\":\"ixpqj\",\"name\":\"wifhbksldttohq\",\"type\":\"lna\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - EnvironmentVersion response = - manager - .environmentVersions() - .getWithResponse("nsm", "ffiwjbctvbp", "ujqjtotdxp", "scsl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wlxrhgt", response.properties().description()); - Assertions.assertEquals("tqqykbkkteozejog", response.properties().properties().get("korvvm")); - Assertions.assertEquals("nosn", response.properties().tags().get("li")); - Assertions.assertEquals(true, response.properties().isAnonymous()); - Assertions.assertEquals(false, response.properties().isArchived()); - Assertions.assertEquals(AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.properties().autoRebuild()); - Assertions.assertEquals("siecktybhj", response.properties().build().contextUri()); - Assertions.assertEquals("idhhxomild", response.properties().build().dockerfilePath()); - Assertions.assertEquals("jxdugxwj", response.properties().condaFile()); - Assertions.assertEquals("qrslaate", response.properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.properties().osType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java deleted file mode 100644 index bb4f62f6016d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EnvironmentVersionsListMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AutoRebuildSetting; -import com.azure.resourcemanager.machinelearning.models.EnvironmentVersion; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.OperatingSystemType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class EnvironmentVersionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"autoRebuild\":\"OnBaseImageUpdate\",\"build\":{\"contextUri\":\"yljurkeposehqqyl\",\"dockerfilePath\":\"ctwjwdsdlzm\"},\"condaFile\":\"erxxxoteehkhowgo\",\"environmentType\":\"UserCreated\",\"image\":\"xowpcbapn\",\"inferenceConfig\":{},\"osType\":\"Windows\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"fey\",\"properties\":{\"jnmzp\":\"ocvvujexayglxrk\",\"ieidzlv\":\"slavxjfiuof\",\"ydv\":\"sqywjopacky\",\"izwgsoriobijeiyd\":\"kmfngpmillxgjs\"},\"tags\":{\"ybriop\":\"ynhbokayrg\",\"igsioctqkm\":\"weoftnorw\",\"xvzfffhtjnwos\":\"ja\",\"zqfcwrriomxee\":\"tfjxtvlx\"}},\"id\":\"yhjm\",\"name\":\"jiqegmxdbs\",\"type\":\"hc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .environmentVersions() - .list( - "eu", - "rbgpxeb", - "ludca", - "tujraxdtpryjm", - 1855345037, - "nsewouxl", - ListViewType.ACTIVE_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("fey", response.iterator().next().properties().description()); - Assertions.assertEquals("ocvvujexayglxrk", response.iterator().next().properties().properties().get("jnmzp")); - Assertions.assertEquals("ynhbokayrg", response.iterator().next().properties().tags().get("ybriop")); - Assertions.assertEquals(true, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions - .assertEquals( - AutoRebuildSetting.ON_BASE_IMAGE_UPDATE, response.iterator().next().properties().autoRebuild()); - Assertions.assertEquals("yljurkeposehqqyl", response.iterator().next().properties().build().contextUri()); - Assertions.assertEquals("ctwjwdsdlzm", response.iterator().next().properties().build().dockerfilePath()); - Assertions.assertEquals("erxxxoteehkhowgo", response.iterator().next().properties().condaFile()); - Assertions.assertEquals("xowpcbapn", response.iterator().next().properties().image()); - Assertions.assertEquals(OperatingSystemType.WINDOWS, response.iterator().next().properties().osType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java deleted file mode 100644 index 74cbfb4f4960..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPriceTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPriceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrice model = - BinaryData - .fromString("{\"retailPrice\":57.931778810567735,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}") - .toObject(EstimatedVMPrice.class); - Assertions.assertEquals(57.931778810567735, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrice model = - new EstimatedVMPrice() - .withRetailPrice(57.931778810567735) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrice.class); - Assertions.assertEquals(57.931778810567735, model.retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java deleted file mode 100644 index 5af3ad025fa0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/EstimatedVMPricesTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EstimatedVMPricesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EstimatedVMPrices model = - BinaryData - .fromString( - "{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":45.736942050047844,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"}]}") - .toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(45.736942050047844, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.values().get(0).vmTier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EstimatedVMPrices model = - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues( - Arrays - .asList( - new EstimatedVMPrice() - .withRetailPrice(45.736942050047844) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY))); - model = BinaryData.fromObject(model).toObject(EstimatedVMPrices.class); - Assertions.assertEquals(BillingCurrency.USD, model.billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.unitOfMeasure()); - Assertions.assertEquals(45.736942050047844, model.values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.WINDOWS, model.values().get(0).osType()); - Assertions.assertEquals(VMTier.LOW_PRIORITY, model.values().get(0).vmTier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java deleted file mode 100644 index a75cd9b0fcc1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ExternalFqdnResponseInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ExternalFqdnResponseInner; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ExternalFqdnResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExternalFqdnResponseInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"category\":\"jflcxog\",\"endpoints\":[]}},{\"properties\":{\"category\":\"nzmnsikvm\",\"endpoints\":[]}}]}") - .toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("jflcxog", model.value().get(0).properties().category()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExternalFqdnResponseInner model = - new ExternalFqdnResponseInner() - .withValue( - Arrays - .asList( - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("jflcxog") - .withEndpoints(Arrays.asList())), - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("nzmnsikvm") - .withEndpoints(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(ExternalFqdnResponseInner.class); - Assertions.assertEquals("jflcxog", model.value().get(0).properties().category()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java deleted file mode 100644 index f57fccd72e81..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FeaturizationSettingsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class FeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FeaturizationSettings model = - BinaryData.fromString("{\"datasetLanguage\":\"hwtbbaedorvvm\"}").toObject(FeaturizationSettings.class); - Assertions.assertEquals("hwtbbaedorvvm", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FeaturizationSettings model = new FeaturizationSettings().withDatasetLanguage("hwtbbaedorvvm"); - model = BinaryData.fromObject(model).toObject(FeaturizationSettings.class); - Assertions.assertEquals("hwtbbaedorvvm", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java deleted file mode 100644 index 11c126dd5b97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FlavorDataTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class FlavorDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FlavorData model = - BinaryData - .fromString( - "{\"data\":{\"sdbccxjmonfdgnwn\":\"bdkelvidizo\",\"keifzzhmkdasv\":\"ypuuwwltvuqjctze\",\"cu\":\"lyhb\"}}") - .toObject(FlavorData.class); - Assertions.assertEquals("bdkelvidizo", model.data().get("sdbccxjmonfdgnwn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FlavorData model = - new FlavorData() - .withData(mapOf("sdbccxjmonfdgnwn", "bdkelvidizo", "keifzzhmkdasv", "ypuuwwltvuqjctze", "cu", "lyhb")); - model = BinaryData.fromObject(model).toObject(FlavorData.class); - Assertions.assertEquals("bdkelvidizo", model.data().get("sdbccxjmonfdgnwn")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java deleted file mode 100644 index ba53d60d641c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastHorizonTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; - -public final class ForecastHorizonTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastHorizon model = BinaryData.fromString("{\"mode\":\"ForecastHorizon\"}").toObject(ForecastHorizon.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastHorizon model = new ForecastHorizon(); - model = BinaryData.fromObject(model).toObject(ForecastHorizon.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java deleted file mode 100644 index bafd52e7516c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingSettingsTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingSettings model = - BinaryData - .fromString( - "{\"countryOrRegionForHolidays\":\"thuqolyahluq\",\"cvStepSize\":608197313,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"rjb\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"None\",\"targetAggregateFunction\":\"None\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"zvqqugdrftbcvexr\",\"timeSeriesIdColumnNames\":[\"uowtljvfwhrea\",\"khyxvrqtvbcz\",\"ulmdgglm\",\"pjpfseykgs\"],\"useStl\":\"Season\"}") - .toObject(ForecastingSettings.class); - Assertions.assertEquals("thuqolyahluq", model.countryOrRegionForHolidays()); - Assertions.assertEquals(608197313, model.cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); - Assertions.assertEquals("rjb", model.frequency()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.NONE, model.targetAggregateFunction()); - Assertions.assertEquals("zvqqugdrftbcvexr", model.timeColumnName()); - Assertions.assertEquals("uowtljvfwhrea", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.SEASON, model.useStl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingSettings model = - new ForecastingSettings() - .withCountryOrRegionForHolidays("thuqolyahluq") - .withCvStepSize(608197313) - .withFeatureLags(FeatureLags.AUTO) - .withForecastHorizon(new ForecastHorizon()) - .withFrequency("rjb") - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.NONE) - .withTargetAggregateFunction(TargetAggregationFunction.NONE) - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withTimeColumnName("zvqqugdrftbcvexr") - .withTimeSeriesIdColumnNames(Arrays.asList("uowtljvfwhrea", "khyxvrqtvbcz", "ulmdgglm", "pjpfseykgs")) - .withUseStl(UseStl.SEASON); - model = BinaryData.fromObject(model).toObject(ForecastingSettings.class); - Assertions.assertEquals("thuqolyahluq", model.countryOrRegionForHolidays()); - Assertions.assertEquals(608197313, model.cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.featureLags()); - Assertions.assertEquals("rjb", model.frequency()); - Assertions.assertEquals(ShortSeriesHandlingConfiguration.NONE, model.shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.NONE, model.targetAggregateFunction()); - Assertions.assertEquals("zvqqugdrftbcvexr", model.timeColumnName()); - Assertions.assertEquals("uowtljvfwhrea", model.timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.SEASON, model.useStl()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java deleted file mode 100644 index 3a4e3ae50a89..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTests.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeatureLags; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.ForecastHorizon; -import com.azure.resourcemanager.machinelearning.models.Forecasting; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.ForecastingSettings; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Seasonality; -import com.azure.resourcemanager.machinelearning.models.ShortSeriesHandlingConfiguration; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TargetAggregationFunction; -import com.azure.resourcemanager.machinelearning.models.TargetLags; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; -import com.azure.resourcemanager.machinelearning.models.UseStl; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Forecasting model = - BinaryData - .fromString( - "{\"taskType\":\"Forecasting\",\"forecastingSettings\":{\"countryOrRegionForHolidays\":\"zxmdew\",\"cvStepSize\":1373177035,\"featureLags\":\"Auto\",\"forecastHorizon\":{\"mode\":\"ForecastHorizon\"},\"frequency\":\"lbjazejww\",\"seasonality\":{\"mode\":\"Seasonality\"},\"shortSeriesHandlingConfig\":\"Pad\",\"targetAggregateFunction\":\"Min\",\"targetLags\":{\"mode\":\"TargetLags\"},\"targetRollingWindowSize\":{\"mode\":\"TargetRollingWindowSize\"},\"timeColumnName\":\"brnnhjxsqw\",\"timeSeriesIdColumnNames\":[\"kbiwetpozyc\",\"qiqyhgfsetzlexbs\"],\"useStl\":\"None\"},\"primaryMetric\":\"R2Score\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"GradientBoosting\",\"SeasonalNaive\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"Arimax\",\"Arimax\",\"Prophet\"],\"enableDnnTraining\":true,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT225H4M15S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datalpkpbafvafhl\",\"stackMetaLearnerTrainPercentage\":11.719010334787338,\"stackMetaLearnerType\":\"ElasticNet\"}},\"cvSplitColumnNames\":[\"xrhyzdfwrsofplt\"],\"featurizationSettings\":{\"blockedTransformers\":[\"WordEmbedding\",\"TextTargetEncoder\",\"TfIdf\",\"TfIdf\"],\"columnNameAndTypes\":{\"npq\":\"fnrac\",\"uuj\":\"g\"},\"enableDnnFeaturization\":false,\"mode\":\"Auto\",\"transformerParams\":{\"igrb\":[],\"xsjybvitvqk\":[],\"az\":[]},\"datasetLanguage\":\"mtggmu\"},\"limitSettings\":{\"enableEarlyTermination\":false,\"exitScore\":73.03774094829895,\"maxConcurrentTrials\":1401154430,\"maxCoresPerTrial\":737761166,\"maxTrials\":273920655,\"timeout\":\"PT29H11M39S\",\"trialTimeout\":\"PT238H15M11S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"voaiknaqlnuw\",\"description\":\"uyxlykwphvxzcw\"},\"testDataSize\":14.530784309792832,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"lkexaonwivkcqh\",\"description\":\"hxknlccrmmkyupi\"},\"validationDataSize\":89.69731810693186,\"weightColumnName\":\"jfkakfqfrke\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"dudxjascowvfdjk\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"phlkksnm\",\"description\":\"vyfijdkzuqnw\"}}") - .toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("dudxjascowvfdjk", model.targetColumnName()); - Assertions.assertEquals("vyfijdkzuqnw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("phlkksnm", model.trainingData().uri()); - Assertions.assertEquals("zxmdew", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals(1373177035, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); - Assertions.assertEquals("lbjazejww", model.forecastingSettings().frequency()); - Assertions - .assertEquals( - ShortSeriesHandlingConfiguration.PAD, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.MIN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals("brnnhjxsqw", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("kbiwetpozyc", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(ForecastingPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT225H4M15S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 11.719010334787338D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ForecastingModels.GRADIENT_BOOSTING, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals(ForecastingModels.RANDOM_FOREST, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("xrhyzdfwrsofplt", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mtggmu", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WORD_EMBEDDING, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("fnrac", model.featurizationSettings().columnNameAndTypes().get("npq")); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(73.03774094829895D, model.limitSettings().exitScore()); - Assertions.assertEquals(1401154430, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(737761166, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(273920655, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H11M39S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT238H15M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("uyxlykwphvxzcw", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("voaiknaqlnuw", model.testData().uri()); - Assertions.assertEquals(14.530784309792832D, model.testDataSize()); - Assertions.assertEquals("hxknlccrmmkyupi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("lkexaonwivkcqh", model.validationData().uri()); - Assertions.assertEquals(89.69731810693186D, model.validationDataSize()); - Assertions.assertEquals("jfkakfqfrke", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Forecasting model = - new Forecasting() - .withLogVerbosity(LogVerbosity.ERROR) - .withTargetColumnName("dudxjascowvfdjk") - .withTrainingData( - new MLTableJobInput() - .withDescription("vyfijdkzuqnw") - .withMode(InputDeliveryMode.DIRECT) - .withUri("phlkksnm")) - .withForecastingSettings( - new ForecastingSettings() - .withCountryOrRegionForHolidays("zxmdew") - .withCvStepSize(1373177035) - .withFeatureLags(FeatureLags.AUTO) - .withForecastHorizon(new ForecastHorizon()) - .withFrequency("lbjazejww") - .withSeasonality(new Seasonality()) - .withShortSeriesHandlingConfig(ShortSeriesHandlingConfiguration.PAD) - .withTargetAggregateFunction(TargetAggregationFunction.MIN) - .withTargetLags(new TargetLags()) - .withTargetRollingWindowSize(new TargetRollingWindowSize()) - .withTimeColumnName("brnnhjxsqw") - .withTimeSeriesIdColumnNames(Arrays.asList("kbiwetpozyc", "qiqyhgfsetzlexbs")) - .withUseStl(UseStl.NONE)) - .withPrimaryMetric(ForecastingPrimaryMetrics.R2SCORE) - .withTrainingSettings( - new ForecastingTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT225H4M15S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datalpkpbafvafhl") - .withStackMetaLearnerTrainPercentage(11.719010334787338D) - .withStackMetaLearnerType(StackMetaLearnerType.ELASTIC_NET)) - .withAllowedTrainingAlgorithms( - Arrays.asList(ForecastingModels.GRADIENT_BOOSTING, ForecastingModels.SEASONAL_NAIVE)) - .withBlockedTrainingAlgorithms( - Arrays - .asList( - ForecastingModels.RANDOM_FOREST, - ForecastingModels.ARIMAX, - ForecastingModels.ARIMAX, - ForecastingModels.PROPHET))) - .withCvSplitColumnNames(Arrays.asList("xrhyzdfwrsofplt")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("mtggmu") - .withBlockedTransformers( - Arrays - .asList( - BlockedTransformers.WORD_EMBEDDING, - BlockedTransformers.TEXT_TARGET_ENCODER, - BlockedTransformers.TF_IDF, - BlockedTransformers.TF_IDF)) - .withColumnNameAndTypes(mapOf("npq", "fnrac", "uuj", "g")) - .withEnableDnnFeaturization(false) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams( - mapOf("igrb", Arrays.asList(), "xsjybvitvqk", Arrays.asList(), "az", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(73.03774094829895D) - .withMaxConcurrentTrials(1401154430) - .withMaxCoresPerTrial(737761166) - .withMaxTrials(273920655) - .withTimeout(Duration.parse("PT29H11M39S")) - .withTrialTimeout(Duration.parse("PT238H15M11S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("uyxlykwphvxzcw") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("voaiknaqlnuw")) - .withTestDataSize(14.530784309792832D) - .withValidationData( - new MLTableJobInput() - .withDescription("hxknlccrmmkyupi") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("lkexaonwivkcqh")) - .withValidationDataSize(89.69731810693186D) - .withWeightColumnName("jfkakfqfrke"); - model = BinaryData.fromObject(model).toObject(Forecasting.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("dudxjascowvfdjk", model.targetColumnName()); - Assertions.assertEquals("vyfijdkzuqnw", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("phlkksnm", model.trainingData().uri()); - Assertions.assertEquals("zxmdew", model.forecastingSettings().countryOrRegionForHolidays()); - Assertions.assertEquals(1373177035, model.forecastingSettings().cvStepSize()); - Assertions.assertEquals(FeatureLags.AUTO, model.forecastingSettings().featureLags()); - Assertions.assertEquals("lbjazejww", model.forecastingSettings().frequency()); - Assertions - .assertEquals( - ShortSeriesHandlingConfiguration.PAD, model.forecastingSettings().shortSeriesHandlingConfig()); - Assertions.assertEquals(TargetAggregationFunction.MIN, model.forecastingSettings().targetAggregateFunction()); - Assertions.assertEquals("brnnhjxsqw", model.forecastingSettings().timeColumnName()); - Assertions.assertEquals("kbiwetpozyc", model.forecastingSettings().timeSeriesIdColumnNames().get(0)); - Assertions.assertEquals(UseStl.NONE, model.forecastingSettings().useStl()); - Assertions.assertEquals(ForecastingPrimaryMetrics.R2SCORE, model.primaryMetric()); - Assertions.assertEquals(true, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(true, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT225H4M15S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 11.719010334787338D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.ELASTIC_NET, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals( - ForecastingModels.GRADIENT_BOOSTING, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals(ForecastingModels.RANDOM_FOREST, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("xrhyzdfwrsofplt", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mtggmu", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.WORD_EMBEDDING, model.featurizationSettings().blockedTransformers().get(0)); - Assertions.assertEquals("fnrac", model.featurizationSettings().columnNameAndTypes().get("npq")); - Assertions.assertEquals(false, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(false, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(73.03774094829895D, model.limitSettings().exitScore()); - Assertions.assertEquals(1401154430, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(737761166, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(273920655, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT29H11M39S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT238H15M11S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("uyxlykwphvxzcw", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("voaiknaqlnuw", model.testData().uri()); - Assertions.assertEquals(14.530784309792832D, model.testDataSize()); - Assertions.assertEquals("hxknlccrmmkyupi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("lkexaonwivkcqh", model.validationData().uri()); - Assertions.assertEquals(89.69731810693186D, model.validationDataSize()); - Assertions.assertEquals("jfkakfqfrke", model.weightColumnName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.java deleted file mode 100644 index c87e4250da7b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ForecastingTrainingSettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ForecastingModels; -import com.azure.resourcemanager.machinelearning.models.ForecastingTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ForecastingTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForecastingTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"RandomForest\",\"TCNForecaster\",\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"RandomForest\",\"Prophet\"],\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT217H25M43S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datadyedmzrgjfo\",\"stackMetaLearnerTrainPercentage\":17.660910285057906,\"stackMetaLearnerType\":\"LightGBMRegressor\"}}") - .toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT217H25M43S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(17.660910285057906D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForecastingTrainingSettings model = - new ForecastingTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT217H25M43S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datadyedmzrgjfo") - .withStackMetaLearnerTrainPercentage(17.660910285057906D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms( - Arrays - .asList( - ForecastingModels.RANDOM_FOREST, - ForecastingModels.TCNFORECASTER, - ForecastingModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms( - Arrays.asList(ForecastingModels.RANDOM_FOREST, ForecastingModels.PROPHET)); - model = BinaryData.fromObject(model).toObject(ForecastingTrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(false, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT217H25M43S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(17.660910285057906D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(ForecastingModels.RANDOM_FOREST, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java deleted file mode 100644 index f09ae260cee0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointDetailTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointDetailTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointDetail model = BinaryData.fromString("{\"port\":1808760283}").toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1808760283, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointDetail model = new FqdnEndpointDetail().withPort(1808760283); - model = BinaryData.fromObject(model).toObject(FqdnEndpointDetail.class); - Assertions.assertEquals(1808760283, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java deleted file mode 100644 index 5a44acf3e578..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointDetail; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoint model = - BinaryData - .fromString( - "{\"domainName\":\"ievseotgqrllt\",\"endpointDetails\":[{\"port\":883294723},{\"port\":1914003848},{\"port\":779410918},{\"port\":1035303462}]}") - .toObject(FqdnEndpoint.class); - Assertions.assertEquals("ievseotgqrllt", model.domainName()); - Assertions.assertEquals(883294723, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoint model = - new FqdnEndpoint() - .withDomainName("ievseotgqrllt") - .withEndpointDetails( - Arrays - .asList( - new FqdnEndpointDetail().withPort(883294723), - new FqdnEndpointDetail().withPort(1914003848), - new FqdnEndpointDetail().withPort(779410918), - new FqdnEndpointDetail().withPort(1035303462))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoint.class); - Assertions.assertEquals("ievseotgqrllt", model.domainName()); - Assertions.assertEquals(883294723, model.endpointDetails().get(0).port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java deleted file mode 100644 index d3543134f5a7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsPropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpointsProperties model = - BinaryData - .fromString( - "{\"category\":\"qxn\",\"endpoints\":[{\"domainName\":\"gxhuriplbp\",\"endpointDetails\":[]},{\"domainName\":\"nkbebxmuby\",\"endpointDetails\":[]},{\"domainName\":\"lrb\",\"endpointDetails\":[]}]}") - .toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("qxn", model.category()); - Assertions.assertEquals("gxhuriplbp", model.endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpointsProperties model = - new FqdnEndpointsProperties() - .withCategory("qxn") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint().withDomainName("gxhuriplbp").withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("nkbebxmuby").withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("lrb").withEndpointDetails(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(FqdnEndpointsProperties.class); - Assertions.assertEquals("qxn", model.category()); - Assertions.assertEquals("gxhuriplbp", model.endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java deleted file mode 100644 index c2bc2b182d72..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/FqdnEndpointsTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoint; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpoints; -import com.azure.resourcemanager.machinelearning.models.FqdnEndpointsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FqdnEndpointsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FqdnEndpoints model = - BinaryData - .fromString( - "{\"properties\":{\"category\":\"qqkdltfzxmhhvhgu\",\"endpoints\":[{\"domainName\":\"kwobdagxtibq\",\"endpointDetails\":[]},{\"domainName\":\"xwak\",\"endpointDetails\":[]}]}}") - .toObject(FqdnEndpoints.class); - Assertions.assertEquals("qqkdltfzxmhhvhgu", model.properties().category()); - Assertions.assertEquals("kwobdagxtibq", model.properties().endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FqdnEndpoints model = - new FqdnEndpoints() - .withProperties( - new FqdnEndpointsProperties() - .withCategory("qqkdltfzxmhhvhgu") - .withEndpoints( - Arrays - .asList( - new FqdnEndpoint() - .withDomainName("kwobdagxtibq") - .withEndpointDetails(Arrays.asList()), - new FqdnEndpoint().withDomainName("xwak").withEndpointDetails(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(FqdnEndpoints.class); - Assertions.assertEquals("qqkdltfzxmhhvhgu", model.properties().category()); - Assertions.assertEquals("kwobdagxtibq", model.properties().endpoints().get(0).domainName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java deleted file mode 100644 index 451f4b5b2a13..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/GridSamplingAlgorithmTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.GridSamplingAlgorithm; - -public final class GridSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GridSamplingAlgorithm model = - BinaryData.fromString("{\"samplingAlgorithmType\":\"Grid\"}").toObject(GridSamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GridSamplingAlgorithm model = new GridSamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(GridSamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java deleted file mode 100644 index d070ba11cf15..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdAssetReferenceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class IdAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdAssetReference model = - BinaryData - .fromString("{\"referenceType\":\"Id\",\"assetId\":\"itpkpztrgdg\"}") - .toObject(IdAssetReference.class); - Assertions.assertEquals("itpkpztrgdg", model.assetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdAssetReference model = new IdAssetReference().withAssetId("itpkpztrgdg"); - model = BinaryData.fromObject(model).toObject(IdAssetReference.class); - Assertions.assertEquals("itpkpztrgdg", model.assetId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java deleted file mode 100644 index e4457f12102b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityConfigurationTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; - -public final class IdentityConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityConfiguration model = - BinaryData.fromString("{\"identityType\":\"IdentityConfiguration\"}").toObject(IdentityConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityConfiguration model = new IdentityConfiguration(); - model = BinaryData.fromObject(model).toObject(IdentityConfiguration.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java deleted file mode 100644 index 9ebb9969d0c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/IdentityForCmkTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityForCmk; -import org.junit.jupiter.api.Assertions; - -public final class IdentityForCmkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IdentityForCmk model = - BinaryData.fromString("{\"userAssignedIdentity\":\"hanufhfcbjysagi\"}").toObject(IdentityForCmk.class); - Assertions.assertEquals("hanufhfcbjysagi", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IdentityForCmk model = new IdentityForCmk().withUserAssignedIdentity("hanufhfcbjysagi"); - model = BinaryData.fromObject(model).toObject(IdentityForCmk.class); - Assertions.assertEquals("hanufhfcbjysagi", model.userAssignedIdentity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java deleted file mode 100644 index 2dbbce706d3a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationBaseTests.java +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationBase; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationBase model = - BinaryData - .fromString( - "{\"modelSettings\":{\"trainingCropSize\":632161025,\"validationCropSize\":1319895932,\"validationResizeSize\":1773341425,\"weightedLoss\":2065297037,\"advancedSettings\":\"a\",\"amsGradient\":true,\"augmentations\":\"nhsenwphpzfng\",\"beta1\":24.413616,\"beta2\":87.05071,\"checkpointFrequency\":304312927,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"wjjufwbe\",\"description\":\"k\"},\"checkpointRunId\":\"rhtssr\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1979060010,\"earlyStoppingPatience\":1774020224,\"enableOnnxNormalization\":true,\"evaluationFrequency\":853491099,\"gradientAccumulationStep\":1971606507,\"layersToFreeze\":323558985,\"learningRate\":42.430317,\"learningRateScheduler\":\"Step\",\"modelName\":\"zwxiytx\",\"momentum\":51.025497,\"nesterov\":true,\"numberOfEpochs\":1378257495,\"numberOfWorkers\":1753150962,\"optimizer\":\"Adam\",\"randomSeed\":1914645473,\"stepLRGamma\":97.39071,\"stepLRStepSize\":218117716,\"trainingBatchSize\":1079594168,\"validationBatchSize\":2132424945,\"warmupCosineLRCycles\":66.13355,\"warmupCosineLRWarmupEpochs\":568274703,\"weightDecay\":67.716774},\"searchSpace\":[{\"trainingCropSize\":\"egmmuteyxe\",\"validationCropSize\":\"uqi\",\"validationResizeSize\":\"jiitnspxlzdesygr\",\"weightedLoss\":\"waiufanra\",\"amsGradient\":\"fueqfrojs\",\"augmentations\":\"grhydk\",\"beta1\":\"ywezskiecafyg\",\"beta2\":\"xieqv\",\"distributed\":\"makli\",\"earlyStopping\":\"cahyhx\",\"earlyStoppingDelay\":\"ybxawoijpodtblx\",\"earlyStoppingPatience\":\"kwjdjodqhy\",\"enableOnnxNormalization\":\"ncn\",\"evaluationFrequency\":\"mehllizhceu\",\"gradientAccumulationStep\":\"qodkadppyibngql\",\"layersToFreeze\":\"ywrxw\",\"learningRate\":\"dtluvvadswzsn\",\"learningRateScheduler\":\"emlowuowhl\",\"modelName\":\"nwyrmouv\",\"momentum\":\"gmokzkltrfowt\",\"nesterov\":\"rfmvlihcvjdrqcrj\",\"numberOfEpochs\":\"h\",\"numberOfWorkers\":\"ukvhd\",\"optimizer\":\"wyojbfqzdkfnjyi\",\"randomSeed\":\"afr\",\"stepLRGamma\":\"qxmbjroumzzn\",\"stepLRStepSize\":\"l\",\"trainingBatchSize\":\"rhuzgfxonjtpu\",\"validationBatchSize\":\"l\",\"warmupCosineLRCycles\":\"pvti\",\"warmupCosineLRWarmupEpochs\":\"zbpdbo\",\"weightDecay\":\"gryfqiuasig\"},{\"trainingCropSize\":\"wsocnequygdjbo\",\"validationCropSize\":\"rmtqjkqevadr\",\"validationResizeSize\":\"wiu\",\"weightedLoss\":\"vcmjzkxiidisczsk\",\"amsGradient\":\"woqiqazugamxzkrr\",\"augmentations\":\"iisb\",\"beta1\":\"nppcce\",\"beta2\":\"ztdsbeza\",\"distributed\":\"f\",\"earlyStopping\":\"zxuizhyhnepkpe\",\"earlyStoppingDelay\":\"arxqiubx\",\"earlyStoppingPatience\":\"kecpxdazvdh\",\"enableOnnxNormalization\":\"mmkoszudb\",\"evaluationFrequency\":\"s\",\"gradientAccumulationStep\":\"rpcaqkiofkbtf\",\"layersToFreeze\":\"kl\",\"learningRate\":\"l\",\"learningRateScheduler\":\"vcb\",\"modelName\":\"ezyquw\",\"momentum\":\"qxutrpbrruyuua\",\"nesterov\":\"lmbjwcolbmxlbnw\",\"numberOfEpochs\":\"cpahprzrvxhm\",\"numberOfWorkers\":\"hocn\",\"optimizer\":\"cmj\",\"randomSeed\":\"gxnoqrxtdis\",\"stepLRGamma\":\"evhdlmydid\",\"stepLRStepSize\":\"epfwwt\",\"trainingBatchSize\":\"doesxxhmwcdb\",\"validationBatchSize\":\"yo\",\"warmupCosineLRCycles\":\"xkxhnegknjzrbhtm\",\"warmupCosineLRWarmupEpochs\":\"lvukaobrlb\",\"weightDecay\":\"snbagnchjhg\"},{\"trainingCropSize\":\"uowakyw\",\"validationCropSize\":\"hjym\",\"validationResizeSize\":\"gqtagd\",\"weightedLoss\":\"lss\",\"amsGradient\":\"jomevtfycnlb\",\"augmentations\":\"jcodkkgjiiytssi\",\"beta1\":\"z\",\"beta2\":\"ufqbvntnr\",\"distributed\":\"qsorh\",\"earlyStopping\":\"kxgnlykmxcpwzvmd\",\"earlyStoppingDelay\":\"sqdtiwlwxlbon\",\"earlyStoppingPatience\":\"bazqicqchygtvxby\",\"enableOnnxNormalization\":\"nepubdpkxyqvgx\",\"evaluationFrequency\":\"od\",\"gradientAccumulationStep\":\"vohkxdxuws\",\"layersToFreeze\":\"fmcwnosb\",\"learningRate\":\"ehgcvkbcknjo\",\"learningRateScheduler\":\"jy\",\"modelName\":\"pvelszerqze\",\"momentum\":\"o\",\"nesterov\":\"intxwa\",\"numberOfEpochs\":\"glzoblqwa\",\"numberOfWorkers\":\"r\",\"optimizer\":\"lhm\",\"randomSeed\":\"qb\",\"stepLRGamma\":\"vafjrqpjiyrqj\",\"stepLRStepSize\":\"gaxwmzwdfkbnrzo\",\"trainingBatchSize\":\"dltb\",\"validationBatchSize\":\"tqjfgxxsaet\",\"warmupCosineLRCycles\":\"dgvpyig\",\"warmupCosineLRWarmupEpochs\":\"qqil\",\"weightDecay\":\"cduwjoedx\"}],\"limitSettings\":{\"maxConcurrentTrials\":1780634429,\"maxTrials\":899036768,\"timeout\":\"PT30H59M40S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1408151149,\"evaluationInterval\":505810781},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"jqqacdmkx\",\"description\":\"dcvjwc\"},\"validationDataSize\":47.866367600253014}") - .toObject(ImageClassificationBase.class); - Assertions.assertEquals(1780634429, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(899036768, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT30H59M40S"), model.limitSettings().timeout()); - Assertions.assertEquals(1408151149, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(505810781, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("dcvjwc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("jqqacdmkx", model.validationData().uri()); - Assertions.assertEquals(47.866367600253014D, model.validationDataSize()); - Assertions.assertEquals("a", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("nhsenwphpzfng", model.modelSettings().augmentations()); - Assertions.assertEquals(24.413616F, model.modelSettings().beta1()); - Assertions.assertEquals(87.05071F, model.modelSettings().beta2()); - Assertions.assertEquals(304312927, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("k", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("wjjufwbe", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("rhtssr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1979060010, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1774020224, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(853491099, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1971606507, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(323558985, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(42.430317F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("zwxiytx", model.modelSettings().modelName()); - Assertions.assertEquals(51.025497F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1378257495, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1753150962, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1914645473, model.modelSettings().randomSeed()); - Assertions.assertEquals(97.39071F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(218117716, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1079594168, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(2132424945, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(66.13355F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(568274703, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(67.716774F, model.modelSettings().weightDecay()); - Assertions.assertEquals(632161025, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(1319895932, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1773341425, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2065297037, model.modelSettings().weightedLoss()); - Assertions.assertEquals("fueqfrojs", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("grhydk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ywezskiecafyg", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("xieqv", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("makli", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cahyhx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("ybxawoijpodtblx", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("kwjdjodqhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("ncn", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mehllizhceu", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("qodkadppyibngql", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("ywrxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("dtluvvadswzsn", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("emlowuowhl", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("nwyrmouv", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("gmokzkltrfowt", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("rfmvlihcvjdrqcrj", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("h", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ukvhd", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("wyojbfqzdkfnjyi", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("afr", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("qxmbjroumzzn", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("l", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("rhuzgfxonjtpu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("l", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("pvti", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("zbpdbo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("gryfqiuasig", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("egmmuteyxe", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("uqi", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("jiitnspxlzdesygr", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("waiufanra", model.searchSpace().get(0).weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationBase model = - new ImageClassificationBase() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1780634429) - .withMaxTrials(899036768) - .withTimeout(Duration.parse("PT30H59M40S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1408151149) - .withEvaluationInterval(505810781)) - .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) - .withValidationData( - new MLTableJobInput() - .withDescription("dcvjwc") - .withMode(InputDeliveryMode.DIRECT) - .withUri("jqqacdmkx")) - .withValidationDataSize(47.866367600253014D) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("a") - .withAmsGradient(true) - .withAugmentations("nhsenwphpzfng") - .withBeta1(24.413616F) - .withBeta2(87.05071F) - .withCheckpointFrequency(304312927) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("k") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("wjjufwbe")) - .withCheckpointRunId("rhtssr") - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1979060010) - .withEarlyStoppingPatience(1774020224) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(853491099) - .withGradientAccumulationStep(1971606507) - .withLayersToFreeze(323558985) - .withLearningRate(42.430317F) - .withLearningRateScheduler(LearningRateScheduler.STEP) - .withModelName("zwxiytx") - .withMomentum(51.025497F) - .withNesterov(true) - .withNumberOfEpochs(1378257495) - .withNumberOfWorkers(1753150962) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1914645473) - .withStepLRGamma(97.39071F) - .withStepLRStepSize(218117716) - .withTrainingBatchSize(1079594168) - .withValidationBatchSize(2132424945) - .withWarmupCosineLRCycles(66.13355F) - .withWarmupCosineLRWarmupEpochs(568274703) - .withWeightDecay(67.716774F) - .withTrainingCropSize(632161025) - .withValidationCropSize(1319895932) - .withValidationResizeSize(1773341425) - .withWeightedLoss(2065297037)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("fueqfrojs") - .withAugmentations("grhydk") - .withBeta1("ywezskiecafyg") - .withBeta2("xieqv") - .withDistributed("makli") - .withEarlyStopping("cahyhx") - .withEarlyStoppingDelay("ybxawoijpodtblx") - .withEarlyStoppingPatience("kwjdjodqhy") - .withEnableOnnxNormalization("ncn") - .withEvaluationFrequency("mehllizhceu") - .withGradientAccumulationStep("qodkadppyibngql") - .withLayersToFreeze("ywrxw") - .withLearningRate("dtluvvadswzsn") - .withLearningRateScheduler("emlowuowhl") - .withModelName("nwyrmouv") - .withMomentum("gmokzkltrfowt") - .withNesterov("rfmvlihcvjdrqcrj") - .withNumberOfEpochs("h") - .withNumberOfWorkers("ukvhd") - .withOptimizer("wyojbfqzdkfnjyi") - .withRandomSeed("afr") - .withStepLRGamma("qxmbjroumzzn") - .withStepLRStepSize("l") - .withTrainingBatchSize("rhuzgfxonjtpu") - .withValidationBatchSize("l") - .withWarmupCosineLRCycles("pvti") - .withWarmupCosineLRWarmupEpochs("zbpdbo") - .withWeightDecay("gryfqiuasig") - .withTrainingCropSize("egmmuteyxe") - .withValidationCropSize("uqi") - .withValidationResizeSize("jiitnspxlzdesygr") - .withWeightedLoss("waiufanra"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("woqiqazugamxzkrr") - .withAugmentations("iisb") - .withBeta1("nppcce") - .withBeta2("ztdsbeza") - .withDistributed("f") - .withEarlyStopping("zxuizhyhnepkpe") - .withEarlyStoppingDelay("arxqiubx") - .withEarlyStoppingPatience("kecpxdazvdh") - .withEnableOnnxNormalization("mmkoszudb") - .withEvaluationFrequency("s") - .withGradientAccumulationStep("rpcaqkiofkbtf") - .withLayersToFreeze("kl") - .withLearningRate("l") - .withLearningRateScheduler("vcb") - .withModelName("ezyquw") - .withMomentum("qxutrpbrruyuua") - .withNesterov("lmbjwcolbmxlbnw") - .withNumberOfEpochs("cpahprzrvxhm") - .withNumberOfWorkers("hocn") - .withOptimizer("cmj") - .withRandomSeed("gxnoqrxtdis") - .withStepLRGamma("evhdlmydid") - .withStepLRStepSize("epfwwt") - .withTrainingBatchSize("doesxxhmwcdb") - .withValidationBatchSize("yo") - .withWarmupCosineLRCycles("xkxhnegknjzrbhtm") - .withWarmupCosineLRWarmupEpochs("lvukaobrlb") - .withWeightDecay("snbagnchjhg") - .withTrainingCropSize("wsocnequygdjbo") - .withValidationCropSize("rmtqjkqevadr") - .withValidationResizeSize("wiu") - .withWeightedLoss("vcmjzkxiidisczsk"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("jomevtfycnlb") - .withAugmentations("jcodkkgjiiytssi") - .withBeta1("z") - .withBeta2("ufqbvntnr") - .withDistributed("qsorh") - .withEarlyStopping("kxgnlykmxcpwzvmd") - .withEarlyStoppingDelay("sqdtiwlwxlbon") - .withEarlyStoppingPatience("bazqicqchygtvxby") - .withEnableOnnxNormalization("nepubdpkxyqvgx") - .withEvaluationFrequency("od") - .withGradientAccumulationStep("vohkxdxuws") - .withLayersToFreeze("fmcwnosb") - .withLearningRate("ehgcvkbcknjo") - .withLearningRateScheduler("jy") - .withModelName("pvelszerqze") - .withMomentum("o") - .withNesterov("intxwa") - .withNumberOfEpochs("glzoblqwa") - .withNumberOfWorkers("r") - .withOptimizer("lhm") - .withRandomSeed("qb") - .withStepLRGamma("vafjrqpjiyrqj") - .withStepLRStepSize("gaxwmzwdfkbnrzo") - .withTrainingBatchSize("dltb") - .withValidationBatchSize("tqjfgxxsaet") - .withWarmupCosineLRCycles("dgvpyig") - .withWarmupCosineLRWarmupEpochs("qqil") - .withWeightDecay("cduwjoedx") - .withTrainingCropSize("uowakyw") - .withValidationCropSize("hjym") - .withValidationResizeSize("gqtagd") - .withWeightedLoss("lss"))); - model = BinaryData.fromObject(model).toObject(ImageClassificationBase.class); - Assertions.assertEquals(1780634429, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(899036768, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT30H59M40S"), model.limitSettings().timeout()); - Assertions.assertEquals(1408151149, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(505810781, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("dcvjwc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("jqqacdmkx", model.validationData().uri()); - Assertions.assertEquals(47.866367600253014D, model.validationDataSize()); - Assertions.assertEquals("a", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("nhsenwphpzfng", model.modelSettings().augmentations()); - Assertions.assertEquals(24.413616F, model.modelSettings().beta1()); - Assertions.assertEquals(87.05071F, model.modelSettings().beta2()); - Assertions.assertEquals(304312927, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("k", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("wjjufwbe", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("rhtssr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1979060010, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1774020224, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(853491099, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1971606507, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(323558985, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(42.430317F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.STEP, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("zwxiytx", model.modelSettings().modelName()); - Assertions.assertEquals(51.025497F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(1378257495, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1753150962, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1914645473, model.modelSettings().randomSeed()); - Assertions.assertEquals(97.39071F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(218117716, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1079594168, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(2132424945, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(66.13355F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(568274703, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(67.716774F, model.modelSettings().weightDecay()); - Assertions.assertEquals(632161025, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(1319895932, model.modelSettings().validationCropSize()); - Assertions.assertEquals(1773341425, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(2065297037, model.modelSettings().weightedLoss()); - Assertions.assertEquals("fueqfrojs", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("grhydk", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("ywezskiecafyg", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("xieqv", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("makli", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("cahyhx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("ybxawoijpodtblx", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("kwjdjodqhy", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("ncn", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("mehllizhceu", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("qodkadppyibngql", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("ywrxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("dtluvvadswzsn", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("emlowuowhl", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("nwyrmouv", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("gmokzkltrfowt", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("rfmvlihcvjdrqcrj", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("h", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("ukvhd", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("wyojbfqzdkfnjyi", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("afr", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("qxmbjroumzzn", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("l", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("rhuzgfxonjtpu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("l", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("pvti", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("zbpdbo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("gryfqiuasig", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("egmmuteyxe", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("uqi", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("jiitnspxlzdesygr", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("waiufanra", model.searchSpace().get(0).weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.java deleted file mode 100644 index 8e2df216288f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationMultilabelTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationMultilabelPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassificationMultilabel; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassificationMultilabel model = - BinaryData - .fromString( - "{\"taskType\":\"ImageClassificationMultilabel\",\"primaryMetric\":\"AUCWeighted\",\"modelSettings\":{\"trainingCropSize\":417240457,\"validationCropSize\":789963505,\"validationResizeSize\":69598333,\"weightedLoss\":1308483372,\"advancedSettings\":\"bjkdtfohf\",\"amsGradient\":true,\"augmentations\":\"vkiwrsiwdyjqu\",\"beta1\":22.829306,\"beta2\":15.07703,\"checkpointFrequency\":405607966,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalMount\",\"uri\":\"kcsueho\",\"description\":\"dac\"},\"checkpointRunId\":\"bgydlqidywm\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":750629994,\"earlyStoppingPatience\":1002138354,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1214590834,\"gradientAccumulationStep\":1690234008,\"layersToFreeze\":541884766,\"learningRate\":83.81946,\"learningRateScheduler\":\"None\",\"modelName\":\"fnqt\",\"momentum\":10.774154,\"nesterov\":false,\"numberOfEpochs\":1583628489,\"numberOfWorkers\":10545664,\"optimizer\":\"Adamw\",\"randomSeed\":645986055,\"stepLRGamma\":13.888711,\"stepLRStepSize\":1004373323,\"trainingBatchSize\":1424628175,\"validationBatchSize\":1893405653,\"warmupCosineLRCycles\":73.06933,\"warmupCosineLRWarmupEpochs\":669991542,\"weightDecay\":8.02623},\"searchSpace\":[{\"trainingCropSize\":\"x\",\"validationCropSize\":\"vmywhsbrcarycsjj\",\"validationResizeSize\":\"voaqajuvehzptdmk\",\"weightedLoss\":\"bhmpfulubefgybp\",\"amsGradient\":\"bfununmpzkrv\",\"augmentations\":\"ifkdschlzvf\",\"beta1\":\"tnkjjwgcwnphb\",\"beta2\":\"fyrtogmhmjp\",\"distributed\":\"cdf\",\"earlyStopping\":\"qwtygevgwmseharx\",\"earlyStoppingDelay\":\"vqnrxtmbpj\",\"earlyStoppingPatience\":\"nvwjhrsidqpxl\",\"enableOnnxNormalization\":\"pakftngatwm\",\"evaluationFrequency\":\"yutrymd\",\"gradientAccumulationStep\":\"fj\",\"layersToFreeze\":\"y\",\"learningRate\":\"jqdvdwkqpldrlefg\",\"learningRateScheduler\":\"avuagnteta\",\"modelName\":\"tnpdctuhspfefy\",\"momentum\":\"duyeuyl\",\"nesterov\":\"hmtybkcgsuthhll\",\"numberOfEpochs\":\"wynefx\",\"numberOfWorkers\":\"lf\",\"optimizer\":\"atxtjrrlkmdskjhh\",\"randomSeed\":\"lajfoxcxscvslxlh\",\"stepLRGamma\":\"vkrmukmyjmkx\",\"stepLRStepSize\":\"tcsloj\",\"trainingBatchSize\":\"qid\",\"validationBatchSize\":\"toqxjh\",\"warmupCosineLRCycles\":\"csqhtkbtnqlrng\",\"warmupCosineLRWarmupEpochs\":\"mbiipsnawwlqk\",\"weightDecay\":\"xhhllxricct\"},{\"trainingCropSize\":\"muqqoajxei\",\"validationCropSize\":\"lesrwva\",\"validationResizeSize\":\"hdctrceqn\",\"weightedLoss\":\"rupobehd\",\"amsGradient\":\"jzacvumepjpbibn\",\"augmentations\":\"phepifexleqirc\",\"beta1\":\"cly\",\"beta2\":\"gxvrpjl\",\"distributed\":\"zuodacpun\",\"earlyStopping\":\"tepdjxqes\",\"earlyStoppingDelay\":\"ynu\",\"earlyStoppingPatience\":\"lpckaewsedves\",\"enableOnnxNormalization\":\"xegqphr\",\"evaluationFrequency\":\"nzhctmjtsgh\",\"gradientAccumulationStep\":\"c\",\"layersToFreeze\":\"pzarpzeqacdld\",\"learningRate\":\"mpypefcpczshnuq\",\"learningRateScheduler\":\"aizu\",\"modelName\":\"kh\",\"momentum\":\"tu\",\"nesterov\":\"xhmt\",\"numberOfEpochs\":\"vegwqiukvz\",\"numberOfWorkers\":\"dwttha\",\"optimizer\":\"gkskjivbss\",\"randomSeed\":\"jqf\",\"stepLRGamma\":\"peexpgeumilhwuit\",\"stepLRStepSize\":\"exyionofninbd\",\"trainingBatchSize\":\"s\",\"validationBatchSize\":\"wqqrsmpcbbprtuga\",\"warmupCosineLRCycles\":\"zbcyksiv\",\"warmupCosineLRWarmupEpochs\":\"ogd\",\"weightDecay\":\"bfcmkrfts\"},{\"trainingCropSize\":\"wjjxsgm\",\"validationCropSize\":\"wvif\",\"validationResizeSize\":\"kecifhocjxwklo\",\"weightedLoss\":\"rvtxvcmufunlc\",\"amsGradient\":\"xvi\",\"augmentations\":\"eyngjg\",\"beta1\":\"quv\",\"beta2\":\"gglpmcrdcuelj\",\"distributed\":\"ahxm\",\"earlyStopping\":\"ryarvsxzqb\",\"earlyStoppingDelay\":\"cjkay\",\"earlyStoppingPatience\":\"thzodubtlmjtgbl\",\"enableOnnxNormalization\":\"skkfmk\",\"evaluationFrequency\":\"djxyxgbkkqvjcteo\",\"gradientAccumulationStep\":\"l\",\"layersToFreeze\":\"lskkzpxvj\",\"learningRate\":\"dpvocojhpcn\",\"learningRateScheduler\":\"xzfsnggytexvzilm\",\"modelName\":\"vzkwwwncknr\",\"momentum\":\"ajlskzptj\",\"nesterov\":\"lwe\",\"numberOfEpochs\":\"yrth\",\"numberOfWorkers\":\"lehmcgcjeinueho\",\"optimizer\":\"mvfejvqnttmbqd\",\"randomSeed\":\"zfivfokpysthhzag\",\"stepLRGamma\":\"wyy\",\"stepLRStepSize\":\"hgenuzejgvkveb\",\"trainingBatchSize\":\"szllrzlsmmdqgmi\",\"validationBatchSize\":\"pimcqrhn\",\"warmupCosineLRCycles\":\"minkl\",\"warmupCosineLRWarmupEpochs\":\"xsvtzarhzvqnsqk\",\"weightDecay\":\"mbjwzzoslpkyb\"},{\"trainingCropSize\":\"lwkzpgajsqjcem\",\"validationCropSize\":\"mfuvqarwzxuqr\",\"validationResizeSize\":\"lui\",\"weightedLoss\":\"bwxsfgtdm\",\"amsGradient\":\"xekr\",\"augmentations\":\"k\",\"beta1\":\"budbt\",\"beta2\":\"okbavlyttaak\",\"distributed\":\"frkebsmhpd\",\"earlyStopping\":\"dig\",\"earlyStoppingDelay\":\"olekscbctnanqim\",\"earlyStoppingPatience\":\"zxpdcldpkawnsnl\",\"enableOnnxNormalization\":\"mouxwksqmudmfco\",\"evaluationFrequency\":\"icziuswswjrkb\",\"gradientAccumulationStep\":\"jhbtqq\",\"layersToFreeze\":\"fs\",\"learningRate\":\"rfwb\",\"learningRateScheduler\":\"qvogfuyz\",\"modelName\":\"bhli\",\"momentum\":\"yqe\",\"nesterov\":\"ood\",\"numberOfEpochs\":\"kcdrdaasaxxobsm\",\"numberOfWorkers\":\"wiyjvzuko\",\"optimizer\":\"nawnvz\",\"randomSeed\":\"n\",\"stepLRGamma\":\"ywsxvjabjqqaxu\",\"stepLRStepSize\":\"y\",\"trainingBatchSize\":\"nudn\",\"validationBatchSize\":\"abhjx\",\"warmupCosineLRCycles\":\"qweuip\",\"warmupCosineLRWarmupEpochs\":\"vk\",\"weightDecay\":\"itnsqxtltc\"}],\"limitSettings\":{\"maxConcurrentTrials\":2077569332,\"maxTrials\":49498731,\"timeout\":\"PT39H45M28S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1996640929,\"evaluationInterval\":1459369662},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"d\",\"description\":\"c\"},\"validationDataSize\":60.747284942704425,\"logVerbosity\":\"Debug\",\"targetColumnName\":\"rjajqmatxjtie\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"qgxxgfbb\",\"description\":\"lpqagyn\"}}") - .toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("rjajqmatxjtie", model.targetColumnName()); - Assertions.assertEquals("lpqagyn", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("qgxxgfbb", model.trainingData().uri()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals("bjkdtfohf", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("vkiwrsiwdyjqu", model.modelSettings().augmentations()); - Assertions.assertEquals(22.829306F, model.modelSettings().beta1()); - Assertions.assertEquals(15.07703F, model.modelSettings().beta2()); - Assertions.assertEquals(405607966, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("dac", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("kcsueho", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("bgydlqidywm", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(750629994, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1002138354, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1214590834, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1690234008, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(541884766, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(83.81946F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("fnqt", model.modelSettings().modelName()); - Assertions.assertEquals(10.774154F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1583628489, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(10545664, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(645986055, model.modelSettings().randomSeed()); - Assertions.assertEquals(13.888711F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1004373323, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1424628175, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1893405653, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(73.06933F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(669991542, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(8.02623F, model.modelSettings().weightDecay()); - Assertions.assertEquals(417240457, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(789963505, model.modelSettings().validationCropSize()); - Assertions.assertEquals(69598333, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1308483372, model.modelSettings().weightedLoss()); - Assertions.assertEquals("bfununmpzkrv", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("ifkdschlzvf", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("tnkjjwgcwnphb", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("fyrtogmhmjp", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("cdf", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("qwtygevgwmseharx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vqnrxtmbpj", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("nvwjhrsidqpxl", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("pakftngatwm", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("yutrymd", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("y", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("avuagnteta", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("tnpdctuhspfefy", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("duyeuyl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hmtybkcgsuthhll", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("wynefx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("lf", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("atxtjrrlkmdskjhh", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lajfoxcxscvslxlh", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("vkrmukmyjmkx", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("tcsloj", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("qid", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("toqxjh", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("csqhtkbtnqlrng", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("mbiipsnawwlqk", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("xhhllxricct", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("x", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("vmywhsbrcarycsjj", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("voaqajuvehzptdmk", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("bhmpfulubefgybp", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(2077569332, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(49498731, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT39H45M28S"), model.limitSettings().timeout()); - Assertions.assertEquals(1996640929, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1459369662, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("c", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("d", model.validationData().uri()); - Assertions.assertEquals(60.747284942704425D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassificationMultilabel model = - new ImageClassificationMultilabel() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("rjajqmatxjtie") - .withTrainingData( - new MLTableJobInput() - .withDescription("lpqagyn") - .withMode(InputDeliveryMode.DIRECT) - .withUri("qgxxgfbb")) - .withPrimaryMetric(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("bjkdtfohf") - .withAmsGradient(true) - .withAugmentations("vkiwrsiwdyjqu") - .withBeta1(22.829306F) - .withBeta2(15.07703F) - .withCheckpointFrequency(405607966) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("dac") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("kcsueho")) - .withCheckpointRunId("bgydlqidywm") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(750629994) - .withEarlyStoppingPatience(1002138354) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1214590834) - .withGradientAccumulationStep(1690234008) - .withLayersToFreeze(541884766) - .withLearningRate(83.81946F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("fnqt") - .withMomentum(10.774154F) - .withNesterov(false) - .withNumberOfEpochs(1583628489) - .withNumberOfWorkers(10545664) - .withOptimizer(StochasticOptimizer.ADAMW) - .withRandomSeed(645986055) - .withStepLRGamma(13.888711F) - .withStepLRStepSize(1004373323) - .withTrainingBatchSize(1424628175) - .withValidationBatchSize(1893405653) - .withWarmupCosineLRCycles(73.06933F) - .withWarmupCosineLRWarmupEpochs(669991542) - .withWeightDecay(8.02623F) - .withTrainingCropSize(417240457) - .withValidationCropSize(789963505) - .withValidationResizeSize(69598333) - .withWeightedLoss(1308483372)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("bfununmpzkrv") - .withAugmentations("ifkdschlzvf") - .withBeta1("tnkjjwgcwnphb") - .withBeta2("fyrtogmhmjp") - .withDistributed("cdf") - .withEarlyStopping("qwtygevgwmseharx") - .withEarlyStoppingDelay("vqnrxtmbpj") - .withEarlyStoppingPatience("nvwjhrsidqpxl") - .withEnableOnnxNormalization("pakftngatwm") - .withEvaluationFrequency("yutrymd") - .withGradientAccumulationStep("fj") - .withLayersToFreeze("y") - .withLearningRate("jqdvdwkqpldrlefg") - .withLearningRateScheduler("avuagnteta") - .withModelName("tnpdctuhspfefy") - .withMomentum("duyeuyl") - .withNesterov("hmtybkcgsuthhll") - .withNumberOfEpochs("wynefx") - .withNumberOfWorkers("lf") - .withOptimizer("atxtjrrlkmdskjhh") - .withRandomSeed("lajfoxcxscvslxlh") - .withStepLRGamma("vkrmukmyjmkx") - .withStepLRStepSize("tcsloj") - .withTrainingBatchSize("qid") - .withValidationBatchSize("toqxjh") - .withWarmupCosineLRCycles("csqhtkbtnqlrng") - .withWarmupCosineLRWarmupEpochs("mbiipsnawwlqk") - .withWeightDecay("xhhllxricct") - .withTrainingCropSize("x") - .withValidationCropSize("vmywhsbrcarycsjj") - .withValidationResizeSize("voaqajuvehzptdmk") - .withWeightedLoss("bhmpfulubefgybp"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("jzacvumepjpbibn") - .withAugmentations("phepifexleqirc") - .withBeta1("cly") - .withBeta2("gxvrpjl") - .withDistributed("zuodacpun") - .withEarlyStopping("tepdjxqes") - .withEarlyStoppingDelay("ynu") - .withEarlyStoppingPatience("lpckaewsedves") - .withEnableOnnxNormalization("xegqphr") - .withEvaluationFrequency("nzhctmjtsgh") - .withGradientAccumulationStep("c") - .withLayersToFreeze("pzarpzeqacdld") - .withLearningRate("mpypefcpczshnuq") - .withLearningRateScheduler("aizu") - .withModelName("kh") - .withMomentum("tu") - .withNesterov("xhmt") - .withNumberOfEpochs("vegwqiukvz") - .withNumberOfWorkers("dwttha") - .withOptimizer("gkskjivbss") - .withRandomSeed("jqf") - .withStepLRGamma("peexpgeumilhwuit") - .withStepLRStepSize("exyionofninbd") - .withTrainingBatchSize("s") - .withValidationBatchSize("wqqrsmpcbbprtuga") - .withWarmupCosineLRCycles("zbcyksiv") - .withWarmupCosineLRWarmupEpochs("ogd") - .withWeightDecay("bfcmkrfts") - .withTrainingCropSize("muqqoajxei") - .withValidationCropSize("lesrwva") - .withValidationResizeSize("hdctrceqn") - .withWeightedLoss("rupobehd"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("xvi") - .withAugmentations("eyngjg") - .withBeta1("quv") - .withBeta2("gglpmcrdcuelj") - .withDistributed("ahxm") - .withEarlyStopping("ryarvsxzqb") - .withEarlyStoppingDelay("cjkay") - .withEarlyStoppingPatience("thzodubtlmjtgbl") - .withEnableOnnxNormalization("skkfmk") - .withEvaluationFrequency("djxyxgbkkqvjcteo") - .withGradientAccumulationStep("l") - .withLayersToFreeze("lskkzpxvj") - .withLearningRate("dpvocojhpcn") - .withLearningRateScheduler("xzfsnggytexvzilm") - .withModelName("vzkwwwncknr") - .withMomentum("ajlskzptj") - .withNesterov("lwe") - .withNumberOfEpochs("yrth") - .withNumberOfWorkers("lehmcgcjeinueho") - .withOptimizer("mvfejvqnttmbqd") - .withRandomSeed("zfivfokpysthhzag") - .withStepLRGamma("wyy") - .withStepLRStepSize("hgenuzejgvkveb") - .withTrainingBatchSize("szllrzlsmmdqgmi") - .withValidationBatchSize("pimcqrhn") - .withWarmupCosineLRCycles("minkl") - .withWarmupCosineLRWarmupEpochs("xsvtzarhzvqnsqk") - .withWeightDecay("mbjwzzoslpkyb") - .withTrainingCropSize("wjjxsgm") - .withValidationCropSize("wvif") - .withValidationResizeSize("kecifhocjxwklo") - .withWeightedLoss("rvtxvcmufunlc"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("xekr") - .withAugmentations("k") - .withBeta1("budbt") - .withBeta2("okbavlyttaak") - .withDistributed("frkebsmhpd") - .withEarlyStopping("dig") - .withEarlyStoppingDelay("olekscbctnanqim") - .withEarlyStoppingPatience("zxpdcldpkawnsnl") - .withEnableOnnxNormalization("mouxwksqmudmfco") - .withEvaluationFrequency("icziuswswjrkb") - .withGradientAccumulationStep("jhbtqq") - .withLayersToFreeze("fs") - .withLearningRate("rfwb") - .withLearningRateScheduler("qvogfuyz") - .withModelName("bhli") - .withMomentum("yqe") - .withNesterov("ood") - .withNumberOfEpochs("kcdrdaasaxxobsm") - .withNumberOfWorkers("wiyjvzuko") - .withOptimizer("nawnvz") - .withRandomSeed("n") - .withStepLRGamma("ywsxvjabjqqaxu") - .withStepLRStepSize("y") - .withTrainingBatchSize("nudn") - .withValidationBatchSize("abhjx") - .withWarmupCosineLRCycles("qweuip") - .withWarmupCosineLRWarmupEpochs("vk") - .withWeightDecay("itnsqxtltc") - .withTrainingCropSize("lwkzpgajsqjcem") - .withValidationCropSize("mfuvqarwzxuqr") - .withValidationResizeSize("lui") - .withWeightedLoss("bwxsfgtdm"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(2077569332) - .withMaxTrials(49498731) - .withTimeout(Duration.parse("PT39H45M28S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1996640929) - .withEvaluationInterval(1459369662)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput().withDescription("c").withMode(InputDeliveryMode.EVAL_MOUNT).withUri("d")) - .withValidationDataSize(60.747284942704425D); - model = BinaryData.fromObject(model).toObject(ImageClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("rjajqmatxjtie", model.targetColumnName()); - Assertions.assertEquals("lpqagyn", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("qgxxgfbb", model.trainingData().uri()); - Assertions.assertEquals(ClassificationMultilabelPrimaryMetrics.AUCWEIGHTED, model.primaryMetric()); - Assertions.assertEquals("bjkdtfohf", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("vkiwrsiwdyjqu", model.modelSettings().augmentations()); - Assertions.assertEquals(22.829306F, model.modelSettings().beta1()); - Assertions.assertEquals(15.07703F, model.modelSettings().beta2()); - Assertions.assertEquals(405607966, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("dac", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("kcsueho", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("bgydlqidywm", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(750629994, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1002138354, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1214590834, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1690234008, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(541884766, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(83.81946F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("fnqt", model.modelSettings().modelName()); - Assertions.assertEquals(10.774154F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1583628489, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(10545664, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(645986055, model.modelSettings().randomSeed()); - Assertions.assertEquals(13.888711F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1004373323, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1424628175, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1893405653, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(73.06933F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(669991542, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(8.02623F, model.modelSettings().weightDecay()); - Assertions.assertEquals(417240457, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(789963505, model.modelSettings().validationCropSize()); - Assertions.assertEquals(69598333, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(1308483372, model.modelSettings().weightedLoss()); - Assertions.assertEquals("bfununmpzkrv", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("ifkdschlzvf", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("tnkjjwgcwnphb", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("fyrtogmhmjp", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("cdf", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("qwtygevgwmseharx", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vqnrxtmbpj", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("nvwjhrsidqpxl", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("pakftngatwm", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("yutrymd", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("fj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("y", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("jqdvdwkqpldrlefg", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("avuagnteta", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("tnpdctuhspfefy", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("duyeuyl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("hmtybkcgsuthhll", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("wynefx", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("lf", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("atxtjrrlkmdskjhh", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("lajfoxcxscvslxlh", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("vkrmukmyjmkx", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("tcsloj", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("qid", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("toqxjh", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("csqhtkbtnqlrng", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("mbiipsnawwlqk", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("xhhllxricct", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("x", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("vmywhsbrcarycsjj", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("voaqajuvehzptdmk", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("bhmpfulubefgybp", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(2077569332, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(49498731, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT39H45M28S"), model.limitSettings().timeout()); - Assertions.assertEquals(1996640929, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1459369662, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("c", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("d", model.validationData().uri()); - Assertions.assertEquals(60.747284942704425D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.java deleted file mode 100644 index 7fd05a78c2d6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageClassificationTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageClassification; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageClassification model = - BinaryData - .fromString( - "{\"taskType\":\"ImageClassification\",\"primaryMetric\":\"NormMacroRecall\",\"modelSettings\":{\"trainingCropSize\":857070249,\"validationCropSize\":372879313,\"validationResizeSize\":2040757308,\"weightedLoss\":601079141,\"advancedSettings\":\"pqitwe\",\"amsGradient\":false,\"augmentations\":\"vskbuhzacaq\",\"beta1\":35.776882,\"beta2\":7.5552106,\"checkpointFrequency\":1409246256,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"pdsxzakuejkm\",\"description\":\"iztjof\"},\"checkpointRunId\":\"vovjufycsjmlbe\",\"distributed\":false,\"earlyStopping\":true,\"earlyStoppingDelay\":1797904663,\"earlyStoppingPatience\":544161528,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1168175827,\"gradientAccumulationStep\":920753916,\"layersToFreeze\":979183363,\"learningRate\":75.56595,\"learningRateScheduler\":\"None\",\"modelName\":\"jfel\",\"momentum\":99.81994,\"nesterov\":true,\"numberOfEpochs\":902490226,\"numberOfWorkers\":1270842979,\"optimizer\":\"Adam\",\"randomSeed\":1405675230,\"stepLRGamma\":4.9547615,\"stepLRStepSize\":462800461,\"trainingBatchSize\":1308773307,\"validationBatchSize\":1918220645,\"warmupCosineLRCycles\":88.28787,\"warmupCosineLRWarmupEpochs\":1219612283,\"weightDecay\":35.093628},\"searchSpace\":[{\"trainingCropSize\":\"ccgzpraoxnyu\",\"validationCropSize\":\"a\",\"validationResizeSize\":\"gftipwc\",\"weightedLoss\":\"yubhiqdx\",\"amsGradient\":\"rnpnuhzafccnuh\",\"augmentations\":\"gbylbuig\",\"beta1\":\"vatvcrkd\",\"beta2\":\"nbqxvhcsyhzlwxae\",\"distributed\":\"vurex\",\"earlyStopping\":\"d\",\"earlyStoppingDelay\":\"dwead\",\"earlyStoppingPatience\":\"zmwntopagt\",\"enableOnnxNormalization\":\"v\",\"evaluationFrequency\":\"agoaqylkjztji\",\"gradientAccumulationStep\":\"zjcg\",\"layersToFreeze\":\"itpfinzcpdl\",\"learningRate\":\"rlgjm\",\"learningRateScheduler\":\"drvcqguef\",\"modelName\":\"ompheqdur\",\"momentum\":\"yujlfyoumpckyecl\",\"nesterov\":\"igptajbrzmqxucyc\",\"numberOfEpochs\":\"oclxiut\",\"numberOfWorkers\":\"cyzyzjdnrqjbt\",\"optimizer\":\"eaoqaqbzgyhf\",\"randomSeed\":\"v\",\"stepLRGamma\":\"tbwbqamteuli\",\"stepLRStepSize\":\"lpkcvmwfauxxep\",\"trainingBatchSize\":\"wbormcqmi\",\"validationBatchSize\":\"ijqpkzfbojxjmcs\",\"warmupCosineLRCycles\":\"qwixvcpwnk\",\"warmupCosineLRWarmupEpochs\":\"wzwofalickduo\",\"weightDecay\":\"tamtyv\"},{\"trainingCropSize\":\"nxrwzawnvs\",\"validationCropSize\":\"fhzag\",\"validationResizeSize\":\"vhycvdimwrzregzg\",\"weightedLoss\":\"futrwpweryekzkd\",\"amsGradient\":\"eotta\",\"augmentations\":\"yos\",\"beta1\":\"whnhjtfv\",\"beta2\":\"dpmiljpn\",\"distributed\":\"nudqllz\",\"earlyStopping\":\"uzpjlxeehux\",\"earlyStoppingDelay\":\"hzlraymezxlsk\",\"earlyStoppingPatience\":\"mxrfdsa\",\"enableOnnxNormalization\":\"ednwyyshtu\",\"evaluationFrequency\":\"mevuafpwzy\",\"gradientAccumulationStep\":\"rkgwltxeqip\",\"layersToFreeze\":\"zdyi\",\"learningRate\":\"fayorpravkjoges\",\"learningRateScheduler\":\"bnsmjkwynqxaek\",\"modelName\":\"ykvwjtqpkevmyltj\",\"momentum\":\"spxklu\",\"nesterov\":\"clf\",\"numberOfEpochs\":\"annnoytzposewx\",\"numberOfWorkers\":\"pxvkqma\",\"optimizer\":\"xvpif\",\"randomSeed\":\"aifyzyzeyuubeids\",\"stepLRGamma\":\"fytoi\",\"stepLRStepSize\":\"gygvfltgvdiho\",\"trainingBatchSize\":\"krxwet\",\"validationBatchSize\":\"drcyrucpcun\",\"warmupCosineLRCycles\":\"zdqumoe\",\"warmupCosineLRWarmupEpochs\":\"dnaienhqhskndnel\",\"weightDecay\":\"aadl\"},{\"trainingCropSize\":\"wf\",\"validationCropSize\":\"nniyopetxi\",\"validationResizeSize\":\"nrlyxnuc\",\"weightedLoss\":\"p\",\"amsGradient\":\"lkwq\",\"augmentations\":\"tv\",\"beta1\":\"sdtcjbctvivuzqym\",\"beta2\":\"owog\",\"distributed\":\"it\",\"earlyStopping\":\"hzvb\",\"earlyStoppingDelay\":\"cdb\",\"earlyStoppingPatience\":\"fzndscxmxeatkd\",\"enableOnnxNormalization\":\"wnrdjyibqbnaom\",\"evaluationFrequency\":\"rmkuh\",\"gradientAccumulationStep\":\"xljalfihc\",\"layersToFreeze\":\"obcancdexxqcw\",\"learningRate\":\"xf\",\"learningRateScheduler\":\"aknokzwjjzrl\",\"modelName\":\"xldzyyfytpqsix\",\"momentum\":\"m\",\"nesterov\":\"jivyqlkjuv\",\"numberOfEpochs\":\"bmslzoyov\",\"numberOfWorkers\":\"dbpqvybefgvm\",\"optimizer\":\"okcvtlubses\",\"randomSeed\":\"cua\",\"stepLRGamma\":\"rhunlp\",\"stepLRStepSize\":\"ykycndzfqi\",\"trainingBatchSize\":\"reuykbbmnwagl\",\"validationBatchSize\":\"xoe\",\"warmupCosineLRCycles\":\"nqlnfwmyymvqd\",\"warmupCosineLRWarmupEpochs\":\"bhfckdvezcrcssb\",\"weightDecay\":\"ddubbnqfblhkal\"}],\"limitSettings\":{\"maxConcurrentTrials\":1165708950,\"maxTrials\":893248980,\"timeout\":\"PT229H8M42S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":536414260,\"evaluationInterval\":693878843},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"gdmin\",\"description\":\"tteajohiygs\"},\"validationDataSize\":75.70753002197551,\"logVerbosity\":\"Debug\",\"targetColumnName\":\"czykmktpvw\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"sehch\",\"description\":\"ufmpqumqyjgy\"}}") - .toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("czykmktpvw", model.targetColumnName()); - Assertions.assertEquals("ufmpqumqyjgy", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("sehch", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals("pqitwe", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vskbuhzacaq", model.modelSettings().augmentations()); - Assertions.assertEquals(35.776882F, model.modelSettings().beta1()); - Assertions.assertEquals(7.5552106F, model.modelSettings().beta2()); - Assertions.assertEquals(1409246256, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("iztjof", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("pdsxzakuejkm", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("vovjufycsjmlbe", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1797904663, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(544161528, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1168175827, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(920753916, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(979183363, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(75.56595F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("jfel", model.modelSettings().modelName()); - Assertions.assertEquals(99.81994F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(902490226, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1270842979, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1405675230, model.modelSettings().randomSeed()); - Assertions.assertEquals(4.9547615F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(462800461, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1308773307, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1918220645, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(88.28787F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1219612283, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(35.093628F, model.modelSettings().weightDecay()); - Assertions.assertEquals(857070249, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(372879313, model.modelSettings().validationCropSize()); - Assertions.assertEquals(2040757308, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(601079141, model.modelSettings().weightedLoss()); - Assertions.assertEquals("rnpnuhzafccnuh", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("gbylbuig", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("vatvcrkd", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("nbqxvhcsyhzlwxae", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("vurex", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("d", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("dwead", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("zmwntopagt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("v", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("agoaqylkjztji", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("zjcg", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("itpfinzcpdl", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("rlgjm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("drvcqguef", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ompheqdur", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("yujlfyoumpckyecl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("igptajbrzmqxucyc", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("oclxiut", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("cyzyzjdnrqjbt", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("eaoqaqbzgyhf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("v", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("tbwbqamteuli", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("lpkcvmwfauxxep", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("wbormcqmi", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("ijqpkzfbojxjmcs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qwixvcpwnk", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("wzwofalickduo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("tamtyv", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("ccgzpraoxnyu", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("a", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("gftipwc", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yubhiqdx", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1165708950, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(893248980, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT229H8M42S"), model.limitSettings().timeout()); - Assertions.assertEquals(536414260, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(693878843, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("tteajohiygs", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gdmin", model.validationData().uri()); - Assertions.assertEquals(75.70753002197551D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageClassification model = - new ImageClassification() - .withLogVerbosity(LogVerbosity.DEBUG) - .withTargetColumnName("czykmktpvw") - .withTrainingData( - new MLTableJobInput() - .withDescription("ufmpqumqyjgy") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("sehch")) - .withPrimaryMetric(ClassificationPrimaryMetrics.NORM_MACRO_RECALL) - .withModelSettings( - new ImageModelSettingsClassification() - .withAdvancedSettings("pqitwe") - .withAmsGradient(false) - .withAugmentations("vskbuhzacaq") - .withBeta1(35.776882F) - .withBeta2(7.5552106F) - .withCheckpointFrequency(1409246256) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("iztjof") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("pdsxzakuejkm")) - .withCheckpointRunId("vovjufycsjmlbe") - .withDistributed(false) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1797904663) - .withEarlyStoppingPatience(544161528) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1168175827) - .withGradientAccumulationStep(920753916) - .withLayersToFreeze(979183363) - .withLearningRate(75.56595F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("jfel") - .withMomentum(99.81994F) - .withNesterov(true) - .withNumberOfEpochs(902490226) - .withNumberOfWorkers(1270842979) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(1405675230) - .withStepLRGamma(4.9547615F) - .withStepLRStepSize(462800461) - .withTrainingBatchSize(1308773307) - .withValidationBatchSize(1918220645) - .withWarmupCosineLRCycles(88.28787F) - .withWarmupCosineLRWarmupEpochs(1219612283) - .withWeightDecay(35.093628F) - .withTrainingCropSize(857070249) - .withValidationCropSize(372879313) - .withValidationResizeSize(2040757308) - .withWeightedLoss(601079141)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsClassification() - .withAmsGradient("rnpnuhzafccnuh") - .withAugmentations("gbylbuig") - .withBeta1("vatvcrkd") - .withBeta2("nbqxvhcsyhzlwxae") - .withDistributed("vurex") - .withEarlyStopping("d") - .withEarlyStoppingDelay("dwead") - .withEarlyStoppingPatience("zmwntopagt") - .withEnableOnnxNormalization("v") - .withEvaluationFrequency("agoaqylkjztji") - .withGradientAccumulationStep("zjcg") - .withLayersToFreeze("itpfinzcpdl") - .withLearningRate("rlgjm") - .withLearningRateScheduler("drvcqguef") - .withModelName("ompheqdur") - .withMomentum("yujlfyoumpckyecl") - .withNesterov("igptajbrzmqxucyc") - .withNumberOfEpochs("oclxiut") - .withNumberOfWorkers("cyzyzjdnrqjbt") - .withOptimizer("eaoqaqbzgyhf") - .withRandomSeed("v") - .withStepLRGamma("tbwbqamteuli") - .withStepLRStepSize("lpkcvmwfauxxep") - .withTrainingBatchSize("wbormcqmi") - .withValidationBatchSize("ijqpkzfbojxjmcs") - .withWarmupCosineLRCycles("qwixvcpwnk") - .withWarmupCosineLRWarmupEpochs("wzwofalickduo") - .withWeightDecay("tamtyv") - .withTrainingCropSize("ccgzpraoxnyu") - .withValidationCropSize("a") - .withValidationResizeSize("gftipwc") - .withWeightedLoss("yubhiqdx"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("eotta") - .withAugmentations("yos") - .withBeta1("whnhjtfv") - .withBeta2("dpmiljpn") - .withDistributed("nudqllz") - .withEarlyStopping("uzpjlxeehux") - .withEarlyStoppingDelay("hzlraymezxlsk") - .withEarlyStoppingPatience("mxrfdsa") - .withEnableOnnxNormalization("ednwyyshtu") - .withEvaluationFrequency("mevuafpwzy") - .withGradientAccumulationStep("rkgwltxeqip") - .withLayersToFreeze("zdyi") - .withLearningRate("fayorpravkjoges") - .withLearningRateScheduler("bnsmjkwynqxaek") - .withModelName("ykvwjtqpkevmyltj") - .withMomentum("spxklu") - .withNesterov("clf") - .withNumberOfEpochs("annnoytzposewx") - .withNumberOfWorkers("pxvkqma") - .withOptimizer("xvpif") - .withRandomSeed("aifyzyzeyuubeids") - .withStepLRGamma("fytoi") - .withStepLRStepSize("gygvfltgvdiho") - .withTrainingBatchSize("krxwet") - .withValidationBatchSize("drcyrucpcun") - .withWarmupCosineLRCycles("zdqumoe") - .withWarmupCosineLRWarmupEpochs("dnaienhqhskndnel") - .withWeightDecay("aadl") - .withTrainingCropSize("nxrwzawnvs") - .withValidationCropSize("fhzag") - .withValidationResizeSize("vhycvdimwrzregzg") - .withWeightedLoss("futrwpweryekzkd"), - new ImageModelDistributionSettingsClassification() - .withAmsGradient("lkwq") - .withAugmentations("tv") - .withBeta1("sdtcjbctvivuzqym") - .withBeta2("owog") - .withDistributed("it") - .withEarlyStopping("hzvb") - .withEarlyStoppingDelay("cdb") - .withEarlyStoppingPatience("fzndscxmxeatkd") - .withEnableOnnxNormalization("wnrdjyibqbnaom") - .withEvaluationFrequency("rmkuh") - .withGradientAccumulationStep("xljalfihc") - .withLayersToFreeze("obcancdexxqcw") - .withLearningRate("xf") - .withLearningRateScheduler("aknokzwjjzrl") - .withModelName("xldzyyfytpqsix") - .withMomentum("m") - .withNesterov("jivyqlkjuv") - .withNumberOfEpochs("bmslzoyov") - .withNumberOfWorkers("dbpqvybefgvm") - .withOptimizer("okcvtlubses") - .withRandomSeed("cua") - .withStepLRGamma("rhunlp") - .withStepLRStepSize("ykycndzfqi") - .withTrainingBatchSize("reuykbbmnwagl") - .withValidationBatchSize("xoe") - .withWarmupCosineLRCycles("nqlnfwmyymvqd") - .withWarmupCosineLRWarmupEpochs("bhfckdvezcrcssb") - .withWeightDecay("ddubbnqfblhkal") - .withTrainingCropSize("wf") - .withValidationCropSize("nniyopetxi") - .withValidationResizeSize("nrlyxnuc") - .withWeightedLoss("p"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1165708950) - .withMaxTrials(893248980) - .withTimeout(Duration.parse("PT229H8M42S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(536414260) - .withEvaluationInterval(693878843)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput() - .withDescription("tteajohiygs") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("gdmin")) - .withValidationDataSize(75.70753002197551D); - model = BinaryData.fromObject(model).toObject(ImageClassification.class); - Assertions.assertEquals(LogVerbosity.DEBUG, model.logVerbosity()); - Assertions.assertEquals("czykmktpvw", model.targetColumnName()); - Assertions.assertEquals("ufmpqumqyjgy", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("sehch", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.NORM_MACRO_RECALL, model.primaryMetric()); - Assertions.assertEquals("pqitwe", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("vskbuhzacaq", model.modelSettings().augmentations()); - Assertions.assertEquals(35.776882F, model.modelSettings().beta1()); - Assertions.assertEquals(7.5552106F, model.modelSettings().beta2()); - Assertions.assertEquals(1409246256, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("iztjof", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("pdsxzakuejkm", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("vovjufycsjmlbe", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(true, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1797904663, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(544161528, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1168175827, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(920753916, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(979183363, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(75.56595F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("jfel", model.modelSettings().modelName()); - Assertions.assertEquals(99.81994F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(902490226, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1270842979, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(1405675230, model.modelSettings().randomSeed()); - Assertions.assertEquals(4.9547615F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(462800461, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1308773307, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1918220645, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(88.28787F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1219612283, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(35.093628F, model.modelSettings().weightDecay()); - Assertions.assertEquals(857070249, model.modelSettings().trainingCropSize()); - Assertions.assertEquals(372879313, model.modelSettings().validationCropSize()); - Assertions.assertEquals(2040757308, model.modelSettings().validationResizeSize()); - Assertions.assertEquals(601079141, model.modelSettings().weightedLoss()); - Assertions.assertEquals("rnpnuhzafccnuh", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("gbylbuig", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("vatvcrkd", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("nbqxvhcsyhzlwxae", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("vurex", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("d", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("dwead", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("zmwntopagt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("v", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("agoaqylkjztji", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("zjcg", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("itpfinzcpdl", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("rlgjm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("drvcqguef", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("ompheqdur", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("yujlfyoumpckyecl", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("igptajbrzmqxucyc", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("oclxiut", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("cyzyzjdnrqjbt", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("eaoqaqbzgyhf", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("v", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("tbwbqamteuli", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("lpkcvmwfauxxep", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("wbormcqmi", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("ijqpkzfbojxjmcs", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("qwixvcpwnk", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("wzwofalickduo", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("tamtyv", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("ccgzpraoxnyu", model.searchSpace().get(0).trainingCropSize()); - Assertions.assertEquals("a", model.searchSpace().get(0).validationCropSize()); - Assertions.assertEquals("gftipwc", model.searchSpace().get(0).validationResizeSize()); - Assertions.assertEquals("yubhiqdx", model.searchSpace().get(0).weightedLoss()); - Assertions.assertEquals(1165708950, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(893248980, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT229H8M42S"), model.limitSettings().timeout()); - Assertions.assertEquals(536414260, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(693878843, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("tteajohiygs", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("gdmin", model.validationData().uri()); - Assertions.assertEquals(75.70753002197551D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java deleted file mode 100644 index 2f1c7507aca2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageInstanceSegmentationTests.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageInstanceSegmentation; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.InstanceSegmentationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageInstanceSegmentationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageInstanceSegmentation model = - BinaryData - .fromString( - "{\"taskType\":\"ImageInstanceSegmentation\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":411999278,\"boxScoreThreshold\":18.429447,\"imageSize\":26955343,\"maxSize\":1642764526,\"minSize\":1482263286,\"modelSize\":\"Large\",\"multiScale\":false,\"nmsIouThreshold\":1.44642,\"tileGridSize\":\"ibmq\",\"tileOverlapRatio\":25.447088,\"tilePredictionsNmsThreshold\":69.32719,\"validationIouThreshold\":22.681719,\"validationMetricType\":\"CocoVoc\",\"advancedSettings\":\"u\",\"amsGradient\":false,\"augmentations\":\"etasvvoqsbp\",\"beta1\":60.15215,\"beta2\":97.623566,\"checkpointFrequency\":94750043,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"EvalDownload\",\"uri\":\"yao\",\"description\":\"zowpuohdkcprgukx\"},\"checkpointRunId\":\"tiochlutixmqr\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":917093220,\"earlyStoppingPatience\":1837159570,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1130120951,\"gradientAccumulationStep\":695678022,\"layersToFreeze\":1955906279,\"learningRate\":2.7083278,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"bcpaqktkrumzued\",\"momentum\":70.79762,\"nesterov\":false,\"numberOfEpochs\":306505202,\"numberOfWorkers\":886379161,\"optimizer\":\"Adam\",\"randomSeed\":113581490,\"stepLRGamma\":42.95044,\"stepLRStepSize\":1447634405,\"trainingBatchSize\":1828475728,\"validationBatchSize\":91831981,\"warmupCosineLRCycles\":61.42521,\"warmupCosineLRWarmupEpochs\":2131168360,\"weightDecay\":87.82275},\"searchSpace\":[{\"boxDetectionsPerImage\":\"qggjhf\",\"boxScoreThreshold\":\"xrqrkijpeuqlsd\",\"imageSize\":\"qztvx\",\"maxSize\":\"wwmjs\",\"minSize\":\"na\",\"modelSize\":\"amecle\",\"multiScale\":\"oulndhzyoeojhto\",\"nmsIouThreshold\":\"h\",\"tileGridSize\":\"idmytzln\",\"tileOverlapRatio\":\"xpno\",\"tilePredictionsNmsThreshold\":\"oanfbcswqagyw\",\"validationIouThreshold\":\"xigvjrktpgaeuk\",\"validationMetricType\":\"wohpmwhqnucs\",\"amsGradient\":\"hsidsjtdlpbnin\",\"augmentations\":\"azlsvbzfcpuo\",\"beta1\":\"dwjcciklhs\",\"beta2\":\"krdre\",\"distributed\":\"olr\",\"earlyStopping\":\"ehqbeivdlhydwbdb\",\"earlyStoppingDelay\":\"rlpunytjlkesmmpa\",\"earlyStoppingPatience\":\"ubt\",\"enableOnnxNormalization\":\"deani\",\"evaluationFrequency\":\"llbvgwzsfftedous\",\"gradientAccumulationStep\":\"tjtgravaqogfkb\",\"layersToFreeze\":\"auzlqbtxxw\",\"learningRate\":\"h\",\"learningRateScheduler\":\"zudrtpzk\",\"modelName\":\"eboywhczzqrhm\",\"momentum\":\"qbedygisrzwn\",\"nesterov\":\"d\",\"numberOfEpochs\":\"jch\",\"numberOfWorkers\":\"mpwctoflds\",\"optimizer\":\"cdhz\",\"randomSeed\":\"kbrfgdrwji\",\"stepLRGamma\":\"whfjsrwqrxe\",\"stepLRStepSize\":\"gcwvrrmdqntycna\",\"trainingBatchSize\":\"hvmaxgnuyeamcmhu\",\"validationBatchSize\":\"jecehokwc\",\"warmupCosineLRCycles\":\"twloesqr\",\"warmupCosineLRWarmupEpochs\":\"vrbnyrukoil\",\"weightDecay\":\"iduw\"}],\"limitSettings\":{\"maxConcurrentTrials\":111210342,\"maxTrials\":844410077,\"timeout\":\"PT37H28M23S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":814563749,\"evaluationInterval\":400227130},\"samplingAlgorithm\":\"Random\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"thqkkwhbgxvellv\",\"description\":\"nxdmnitmujdtv\"},\"validationDataSize\":82.02510999731906,\"logVerbosity\":\"NotSet\",\"targetColumnName\":\"fhmjp\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"yx\",\"description\":\"uvrzmzqmzjqrb\"}}") - .toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("fhmjp", model.targetColumnName()); - Assertions.assertEquals("uvrzmzqmzjqrb", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("yx", model.trainingData().uri()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("u", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("etasvvoqsbp", model.modelSettings().augmentations()); - Assertions.assertEquals(60.15215F, model.modelSettings().beta1()); - Assertions.assertEquals(97.623566F, model.modelSettings().beta2()); - Assertions.assertEquals(94750043, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("zowpuohdkcprgukx", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("yao", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("tiochlutixmqr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(917093220, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1837159570, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1130120951, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(695678022, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1955906279, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(2.7083278F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("bcpaqktkrumzued", model.modelSettings().modelName()); - Assertions.assertEquals(70.79762F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(306505202, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(886379161, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(113581490, model.modelSettings().randomSeed()); - Assertions.assertEquals(42.95044F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1447634405, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1828475728, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(91831981, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(61.42521F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2131168360, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.82275F, model.modelSettings().weightDecay()); - Assertions.assertEquals(411999278, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(18.429447F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(26955343, model.modelSettings().imageSize()); - Assertions.assertEquals(1642764526, model.modelSettings().maxSize()); - Assertions.assertEquals(1482263286, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(1.44642F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("ibmq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(25.447088F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(69.32719F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(22.681719F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("hsidsjtdlpbnin", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("azlsvbzfcpuo", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("dwjcciklhs", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("krdre", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("olr", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("rlpunytjlkesmmpa", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ubt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("deani", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("llbvgwzsfftedous", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("tjtgravaqogfkb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("auzlqbtxxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("h", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("zudrtpzk", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("eboywhczzqrhm", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qbedygisrzwn", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("d", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("jch", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("mpwctoflds", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("cdhz", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("kbrfgdrwji", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("whfjsrwqrxe", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("gcwvrrmdqntycna", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("hvmaxgnuyeamcmhu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("jecehokwc", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("twloesqr", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("vrbnyrukoil", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("iduw", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("qggjhf", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("xrqrkijpeuqlsd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("qztvx", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wwmjs", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("na", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("amecle", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("oulndhzyoeojhto", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("h", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("idmytzln", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpno", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("oanfbcswqagyw", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("xigvjrktpgaeuk", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("wohpmwhqnucs", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(111210342, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(844410077, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT37H28M23S"), model.limitSettings().timeout()); - Assertions.assertEquals(814563749, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(400227130, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nxdmnitmujdtv", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("thqkkwhbgxvellv", model.validationData().uri()); - Assertions.assertEquals(82.02510999731906D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageInstanceSegmentation model = - new ImageInstanceSegmentation() - .withLogVerbosity(LogVerbosity.NOT_SET) - .withTargetColumnName("fhmjp") - .withTrainingData( - new MLTableJobInput() - .withDescription("uvrzmzqmzjqrb") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("yx")) - .withPrimaryMetric(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("u") - .withAmsGradient(false) - .withAugmentations("etasvvoqsbp") - .withBeta1(60.15215F) - .withBeta2(97.623566F) - .withCheckpointFrequency(94750043) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("zowpuohdkcprgukx") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("yao")) - .withCheckpointRunId("tiochlutixmqr") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(917093220) - .withEarlyStoppingPatience(1837159570) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1130120951) - .withGradientAccumulationStep(695678022) - .withLayersToFreeze(1955906279) - .withLearningRate(2.7083278F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("bcpaqktkrumzued") - .withMomentum(70.79762F) - .withNesterov(false) - .withNumberOfEpochs(306505202) - .withNumberOfWorkers(886379161) - .withOptimizer(StochasticOptimizer.ADAM) - .withRandomSeed(113581490) - .withStepLRGamma(42.95044F) - .withStepLRStepSize(1447634405) - .withTrainingBatchSize(1828475728) - .withValidationBatchSize(91831981) - .withWarmupCosineLRCycles(61.42521F) - .withWarmupCosineLRWarmupEpochs(2131168360) - .withWeightDecay(87.82275F) - .withBoxDetectionsPerImage(411999278) - .withBoxScoreThreshold(18.429447F) - .withImageSize(26955343) - .withMaxSize(1642764526) - .withMinSize(1482263286) - .withModelSize(ModelSize.LARGE) - .withMultiScale(false) - .withNmsIouThreshold(1.44642F) - .withTileGridSize("ibmq") - .withTileOverlapRatio(25.447088F) - .withTilePredictionsNmsThreshold(69.32719F) - .withValidationIouThreshold(22.681719F) - .withValidationMetricType(ValidationMetricType.COCO_VOC)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("hsidsjtdlpbnin") - .withAugmentations("azlsvbzfcpuo") - .withBeta1("dwjcciklhs") - .withBeta2("krdre") - .withDistributed("olr") - .withEarlyStopping("ehqbeivdlhydwbdb") - .withEarlyStoppingDelay("rlpunytjlkesmmpa") - .withEarlyStoppingPatience("ubt") - .withEnableOnnxNormalization("deani") - .withEvaluationFrequency("llbvgwzsfftedous") - .withGradientAccumulationStep("tjtgravaqogfkb") - .withLayersToFreeze("auzlqbtxxw") - .withLearningRate("h") - .withLearningRateScheduler("zudrtpzk") - .withModelName("eboywhczzqrhm") - .withMomentum("qbedygisrzwn") - .withNesterov("d") - .withNumberOfEpochs("jch") - .withNumberOfWorkers("mpwctoflds") - .withOptimizer("cdhz") - .withRandomSeed("kbrfgdrwji") - .withStepLRGamma("whfjsrwqrxe") - .withStepLRStepSize("gcwvrrmdqntycna") - .withTrainingBatchSize("hvmaxgnuyeamcmhu") - .withValidationBatchSize("jecehokwc") - .withWarmupCosineLRCycles("twloesqr") - .withWarmupCosineLRWarmupEpochs("vrbnyrukoil") - .withWeightDecay("iduw") - .withBoxDetectionsPerImage("qggjhf") - .withBoxScoreThreshold("xrqrkijpeuqlsd") - .withImageSize("qztvx") - .withMaxSize("wwmjs") - .withMinSize("na") - .withModelSize("amecle") - .withMultiScale("oulndhzyoeojhto") - .withNmsIouThreshold("h") - .withTileGridSize("idmytzln") - .withTileOverlapRatio("xpno") - .withTilePredictionsNmsThreshold("oanfbcswqagyw") - .withValidationIouThreshold("xigvjrktpgaeuk") - .withValidationMetricType("wohpmwhqnucs"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(111210342) - .withMaxTrials(844410077) - .withTimeout(Duration.parse("PT37H28M23S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(814563749) - .withEvaluationInterval(400227130)) - .withSamplingAlgorithm(SamplingAlgorithmType.RANDOM)) - .withValidationData( - new MLTableJobInput() - .withDescription("nxdmnitmujdtv") - .withMode(InputDeliveryMode.DIRECT) - .withUri("thqkkwhbgxvellv")) - .withValidationDataSize(82.02510999731906D); - model = BinaryData.fromObject(model).toObject(ImageInstanceSegmentation.class); - Assertions.assertEquals(LogVerbosity.NOT_SET, model.logVerbosity()); - Assertions.assertEquals("fhmjp", model.targetColumnName()); - Assertions.assertEquals("uvrzmzqmzjqrb", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("yx", model.trainingData().uri()); - Assertions.assertEquals(InstanceSegmentationPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("u", model.modelSettings().advancedSettings()); - Assertions.assertEquals(false, model.modelSettings().amsGradient()); - Assertions.assertEquals("etasvvoqsbp", model.modelSettings().augmentations()); - Assertions.assertEquals(60.15215F, model.modelSettings().beta1()); - Assertions.assertEquals(97.623566F, model.modelSettings().beta2()); - Assertions.assertEquals(94750043, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("zowpuohdkcprgukx", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("yao", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("tiochlutixmqr", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(917093220, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1837159570, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1130120951, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(695678022, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(1955906279, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(2.7083278F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("bcpaqktkrumzued", model.modelSettings().modelName()); - Assertions.assertEquals(70.79762F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(306505202, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(886379161, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAM, model.modelSettings().optimizer()); - Assertions.assertEquals(113581490, model.modelSettings().randomSeed()); - Assertions.assertEquals(42.95044F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1447634405, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1828475728, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(91831981, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(61.42521F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2131168360, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(87.82275F, model.modelSettings().weightDecay()); - Assertions.assertEquals(411999278, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(18.429447F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(26955343, model.modelSettings().imageSize()); - Assertions.assertEquals(1642764526, model.modelSettings().maxSize()); - Assertions.assertEquals(1482263286, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(1.44642F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("ibmq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(25.447088F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(69.32719F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(22.681719F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("hsidsjtdlpbnin", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("azlsvbzfcpuo", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("dwjcciklhs", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("krdre", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("olr", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("ehqbeivdlhydwbdb", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("rlpunytjlkesmmpa", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("ubt", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("deani", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("llbvgwzsfftedous", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("tjtgravaqogfkb", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("auzlqbtxxw", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("h", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("zudrtpzk", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("eboywhczzqrhm", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("qbedygisrzwn", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("d", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("jch", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("mpwctoflds", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("cdhz", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("kbrfgdrwji", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("whfjsrwqrxe", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("gcwvrrmdqntycna", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("hvmaxgnuyeamcmhu", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("jecehokwc", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("twloesqr", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("vrbnyrukoil", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("iduw", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("qggjhf", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("xrqrkijpeuqlsd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("qztvx", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("wwmjs", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("na", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("amecle", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("oulndhzyoeojhto", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("h", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("idmytzln", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpno", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("oanfbcswqagyw", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("xigvjrktpgaeuk", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("wohpmwhqnucs", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(111210342, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(844410077, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT37H28M23S"), model.limitSettings().timeout()); - Assertions.assertEquals(814563749, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(400227130, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.RANDOM, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nxdmnitmujdtv", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("thqkkwhbgxvellv", model.validationData().uri()); - Assertions.assertEquals(82.02510999731906D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java deleted file mode 100644 index 6cb12aca74fb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageLimitSettingsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageLimitSettings model = - BinaryData - .fromString("{\"maxConcurrentTrials\":543709562,\"maxTrials\":848455814,\"timeout\":\"PT224H41M46S\"}") - .toObject(ImageLimitSettings.class); - Assertions.assertEquals(543709562, model.maxConcurrentTrials()); - Assertions.assertEquals(848455814, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT224H41M46S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageLimitSettings model = - new ImageLimitSettings() - .withMaxConcurrentTrials(543709562) - .withMaxTrials(848455814) - .withTimeout(Duration.parse("PT224H41M46S")); - model = BinaryData.fromObject(model).toObject(ImageLimitSettings.class); - Assertions.assertEquals(543709562, model.maxConcurrentTrials()); - Assertions.assertEquals(848455814, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT224H41M46S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java deleted file mode 100644 index b8076b71567d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsClassificationTests.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsClassification; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsClassification model = - BinaryData - .fromString( - "{\"trainingCropSize\":\"jmfczlfsyqkf\",\"validationCropSize\":\"zgowox\",\"validationResizeSize\":\"je\",\"weightedLoss\":\"cxn\",\"amsGradient\":\"gxhlusr\",\"augmentations\":\"i\",\"beta1\":\"mjceagbjqvls\",\"beta2\":\"ywzash\",\"distributed\":\"onoyjf\",\"earlyStopping\":\"puby\",\"earlyStoppingDelay\":\"clkfkee\",\"earlyStoppingPatience\":\"vop\",\"enableOnnxNormalization\":\"tuoqujlyegqavni\",\"evaluationFrequency\":\"lqqbtnyjpylxdbfv\",\"gradientAccumulationStep\":\"mvmsxbae\",\"layersToFreeze\":\"jcnkottlwu\",\"learningRate\":\"ajmailfemjjza\",\"learningRateScheduler\":\"wjiqullqxb\",\"modelName\":\"vr\",\"momentum\":\"mqerndb\",\"nesterov\":\"yeofltfnnxrkad\",\"numberOfEpochs\":\"ynnfmuiii\",\"numberOfWorkers\":\"pfoh\",\"optimizer\":\"fkx\",\"randomSeed\":\"cbrwjiutgnjizbe\",\"stepLRGamma\":\"oiymrvzbjuyrsrzi\",\"stepLRStepSize\":\"tixgbd\",\"trainingBatchSize\":\"ifrevk\",\"validationBatchSize\":\"pezkis\",\"warmupCosineLRCycles\":\"jm\",\"warmupCosineLRWarmupEpochs\":\"hsyparybjuf\",\"weightDecay\":\"bjczjnciuiyqvlda\"}") - .toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("gxhlusr", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("mjceagbjqvls", model.beta1()); - Assertions.assertEquals("ywzash", model.beta2()); - Assertions.assertEquals("onoyjf", model.distributed()); - Assertions.assertEquals("puby", model.earlyStopping()); - Assertions.assertEquals("clkfkee", model.earlyStoppingDelay()); - Assertions.assertEquals("vop", model.earlyStoppingPatience()); - Assertions.assertEquals("tuoqujlyegqavni", model.enableOnnxNormalization()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.evaluationFrequency()); - Assertions.assertEquals("mvmsxbae", model.gradientAccumulationStep()); - Assertions.assertEquals("jcnkottlwu", model.layersToFreeze()); - Assertions.assertEquals("ajmailfemjjza", model.learningRate()); - Assertions.assertEquals("wjiqullqxb", model.learningRateScheduler()); - Assertions.assertEquals("vr", model.modelName()); - Assertions.assertEquals("mqerndb", model.momentum()); - Assertions.assertEquals("yeofltfnnxrkad", model.nesterov()); - Assertions.assertEquals("ynnfmuiii", model.numberOfEpochs()); - Assertions.assertEquals("pfoh", model.numberOfWorkers()); - Assertions.assertEquals("fkx", model.optimizer()); - Assertions.assertEquals("cbrwjiutgnjizbe", model.randomSeed()); - Assertions.assertEquals("oiymrvzbjuyrsrzi", model.stepLRGamma()); - Assertions.assertEquals("tixgbd", model.stepLRStepSize()); - Assertions.assertEquals("ifrevk", model.trainingBatchSize()); - Assertions.assertEquals("pezkis", model.validationBatchSize()); - Assertions.assertEquals("jm", model.warmupCosineLRCycles()); - Assertions.assertEquals("hsyparybjuf", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("bjczjnciuiyqvlda", model.weightDecay()); - Assertions.assertEquals("jmfczlfsyqkf", model.trainingCropSize()); - Assertions.assertEquals("zgowox", model.validationCropSize()); - Assertions.assertEquals("je", model.validationResizeSize()); - Assertions.assertEquals("cxn", model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsClassification model = - new ImageModelDistributionSettingsClassification() - .withAmsGradient("gxhlusr") - .withAugmentations("i") - .withBeta1("mjceagbjqvls") - .withBeta2("ywzash") - .withDistributed("onoyjf") - .withEarlyStopping("puby") - .withEarlyStoppingDelay("clkfkee") - .withEarlyStoppingPatience("vop") - .withEnableOnnxNormalization("tuoqujlyegqavni") - .withEvaluationFrequency("lqqbtnyjpylxdbfv") - .withGradientAccumulationStep("mvmsxbae") - .withLayersToFreeze("jcnkottlwu") - .withLearningRate("ajmailfemjjza") - .withLearningRateScheduler("wjiqullqxb") - .withModelName("vr") - .withMomentum("mqerndb") - .withNesterov("yeofltfnnxrkad") - .withNumberOfEpochs("ynnfmuiii") - .withNumberOfWorkers("pfoh") - .withOptimizer("fkx") - .withRandomSeed("cbrwjiutgnjizbe") - .withStepLRGamma("oiymrvzbjuyrsrzi") - .withStepLRStepSize("tixgbd") - .withTrainingBatchSize("ifrevk") - .withValidationBatchSize("pezkis") - .withWarmupCosineLRCycles("jm") - .withWarmupCosineLRWarmupEpochs("hsyparybjuf") - .withWeightDecay("bjczjnciuiyqvlda") - .withTrainingCropSize("jmfczlfsyqkf") - .withValidationCropSize("zgowox") - .withValidationResizeSize("je") - .withWeightedLoss("cxn"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsClassification.class); - Assertions.assertEquals("gxhlusr", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("mjceagbjqvls", model.beta1()); - Assertions.assertEquals("ywzash", model.beta2()); - Assertions.assertEquals("onoyjf", model.distributed()); - Assertions.assertEquals("puby", model.earlyStopping()); - Assertions.assertEquals("clkfkee", model.earlyStoppingDelay()); - Assertions.assertEquals("vop", model.earlyStoppingPatience()); - Assertions.assertEquals("tuoqujlyegqavni", model.enableOnnxNormalization()); - Assertions.assertEquals("lqqbtnyjpylxdbfv", model.evaluationFrequency()); - Assertions.assertEquals("mvmsxbae", model.gradientAccumulationStep()); - Assertions.assertEquals("jcnkottlwu", model.layersToFreeze()); - Assertions.assertEquals("ajmailfemjjza", model.learningRate()); - Assertions.assertEquals("wjiqullqxb", model.learningRateScheduler()); - Assertions.assertEquals("vr", model.modelName()); - Assertions.assertEquals("mqerndb", model.momentum()); - Assertions.assertEquals("yeofltfnnxrkad", model.nesterov()); - Assertions.assertEquals("ynnfmuiii", model.numberOfEpochs()); - Assertions.assertEquals("pfoh", model.numberOfWorkers()); - Assertions.assertEquals("fkx", model.optimizer()); - Assertions.assertEquals("cbrwjiutgnjizbe", model.randomSeed()); - Assertions.assertEquals("oiymrvzbjuyrsrzi", model.stepLRGamma()); - Assertions.assertEquals("tixgbd", model.stepLRStepSize()); - Assertions.assertEquals("ifrevk", model.trainingBatchSize()); - Assertions.assertEquals("pezkis", model.validationBatchSize()); - Assertions.assertEquals("jm", model.warmupCosineLRCycles()); - Assertions.assertEquals("hsyparybjuf", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("bjczjnciuiyqvlda", model.weightDecay()); - Assertions.assertEquals("jmfczlfsyqkf", model.trainingCropSize()); - Assertions.assertEquals("zgowox", model.validationCropSize()); - Assertions.assertEquals("je", model.validationResizeSize()); - Assertions.assertEquals("cxn", model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java deleted file mode 100644 index 968465a57c12..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsObjectDetectionTests.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model = - BinaryData - .fromString( - "{\"boxDetectionsPerImage\":\"isubxbteog\",\"boxScoreThreshold\":\"fiijrykwlefksxqc\",\"imageSize\":\"zfpxgnmqvzvluy\",\"maxSize\":\"aiossscyvaifp\",\"minSize\":\"acvfyeowps\",\"modelSize\":\"tjdhsoymhpvtyq\",\"multiScale\":\"tehdpboujs\",\"nmsIouThreshold\":\"fvvdshxcdedsue\",\"tileGridSize\":\"gnxcgjtfrnquktr\",\"tileOverlapRatio\":\"s\",\"tilePredictionsNmsThreshold\":\"lr\",\"validationIouThreshold\":\"myltrwntfmtbg\",\"validationMetricType\":\"dxwnazkurrd\",\"amsGradient\":\"yzjwhsetwwjwzzq\",\"augmentations\":\"uzu\",\"beta1\":\"y\",\"beta2\":\"yqhyqqzzdcykey\",\"distributed\":\"ewfopazdazg\",\"earlyStopping\":\"qgpewqcfutmdpvoz\",\"earlyStoppingDelay\":\"qjbknl\",\"earlyStoppingPatience\":\"lctzeyowmndcovd\",\"enableOnnxNormalization\":\"qauxzan\",\"evaluationFrequency\":\"kvfruwkudr\",\"gradientAccumulationStep\":\"pftxudqyeme\",\"layersToFreeze\":\"naucmcirtnee\",\"learningRate\":\"jauwcgxefnohaitr\",\"learningRateScheduler\":\"izerw\",\"modelName\":\"dasmxu\",\"momentum\":\"fbngfcocef\",\"nesterov\":\"riylfmpztra\",\"numberOfEpochs\":\"svhl\",\"numberOfWorkers\":\"culregpqt\",\"optimizer\":\"jhvrztnvgyshqrdg\",\"randomSeed\":\"wmewjzlpyk\",\"stepLRGamma\":\"azzwjcay\",\"stepLRStepSize\":\"zrransyb\",\"trainingBatchSize\":\"polwzrghsrlei\",\"validationBatchSize\":\"fscjfn\",\"warmupCosineLRCycles\":\"wvuagfqwtl\",\"warmupCosineLRWarmupEpochs\":\"gvmreuptrklzmi\",\"weightDecay\":\"jwolxfsvaghmpynw\"}") - .toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("yzjwhsetwwjwzzq", model.amsGradient()); - Assertions.assertEquals("uzu", model.augmentations()); - Assertions.assertEquals("y", model.beta1()); - Assertions.assertEquals("yqhyqqzzdcykey", model.beta2()); - Assertions.assertEquals("ewfopazdazg", model.distributed()); - Assertions.assertEquals("qgpewqcfutmdpvoz", model.earlyStopping()); - Assertions.assertEquals("qjbknl", model.earlyStoppingDelay()); - Assertions.assertEquals("lctzeyowmndcovd", model.earlyStoppingPatience()); - Assertions.assertEquals("qauxzan", model.enableOnnxNormalization()); - Assertions.assertEquals("kvfruwkudr", model.evaluationFrequency()); - Assertions.assertEquals("pftxudqyeme", model.gradientAccumulationStep()); - Assertions.assertEquals("naucmcirtnee", model.layersToFreeze()); - Assertions.assertEquals("jauwcgxefnohaitr", model.learningRate()); - Assertions.assertEquals("izerw", model.learningRateScheduler()); - Assertions.assertEquals("dasmxu", model.modelName()); - Assertions.assertEquals("fbngfcocef", model.momentum()); - Assertions.assertEquals("riylfmpztra", model.nesterov()); - Assertions.assertEquals("svhl", model.numberOfEpochs()); - Assertions.assertEquals("culregpqt", model.numberOfWorkers()); - Assertions.assertEquals("jhvrztnvgyshqrdg", model.optimizer()); - Assertions.assertEquals("wmewjzlpyk", model.randomSeed()); - Assertions.assertEquals("azzwjcay", model.stepLRGamma()); - Assertions.assertEquals("zrransyb", model.stepLRStepSize()); - Assertions.assertEquals("polwzrghsrlei", model.trainingBatchSize()); - Assertions.assertEquals("fscjfn", model.validationBatchSize()); - Assertions.assertEquals("wvuagfqwtl", model.warmupCosineLRCycles()); - Assertions.assertEquals("gvmreuptrklzmi", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("jwolxfsvaghmpynw", model.weightDecay()); - Assertions.assertEquals("isubxbteog", model.boxDetectionsPerImage()); - Assertions.assertEquals("fiijrykwlefksxqc", model.boxScoreThreshold()); - Assertions.assertEquals("zfpxgnmqvzvluy", model.imageSize()); - Assertions.assertEquals("aiossscyvaifp", model.maxSize()); - Assertions.assertEquals("acvfyeowps", model.minSize()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.modelSize()); - Assertions.assertEquals("tehdpboujs", model.multiScale()); - Assertions.assertEquals("fvvdshxcdedsue", model.nmsIouThreshold()); - Assertions.assertEquals("gnxcgjtfrnquktr", model.tileGridSize()); - Assertions.assertEquals("s", model.tileOverlapRatio()); - Assertions.assertEquals("lr", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("myltrwntfmtbg", model.validationIouThreshold()); - Assertions.assertEquals("dxwnazkurrd", model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettingsObjectDetection model = - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("yzjwhsetwwjwzzq") - .withAugmentations("uzu") - .withBeta1("y") - .withBeta2("yqhyqqzzdcykey") - .withDistributed("ewfopazdazg") - .withEarlyStopping("qgpewqcfutmdpvoz") - .withEarlyStoppingDelay("qjbknl") - .withEarlyStoppingPatience("lctzeyowmndcovd") - .withEnableOnnxNormalization("qauxzan") - .withEvaluationFrequency("kvfruwkudr") - .withGradientAccumulationStep("pftxudqyeme") - .withLayersToFreeze("naucmcirtnee") - .withLearningRate("jauwcgxefnohaitr") - .withLearningRateScheduler("izerw") - .withModelName("dasmxu") - .withMomentum("fbngfcocef") - .withNesterov("riylfmpztra") - .withNumberOfEpochs("svhl") - .withNumberOfWorkers("culregpqt") - .withOptimizer("jhvrztnvgyshqrdg") - .withRandomSeed("wmewjzlpyk") - .withStepLRGamma("azzwjcay") - .withStepLRStepSize("zrransyb") - .withTrainingBatchSize("polwzrghsrlei") - .withValidationBatchSize("fscjfn") - .withWarmupCosineLRCycles("wvuagfqwtl") - .withWarmupCosineLRWarmupEpochs("gvmreuptrklzmi") - .withWeightDecay("jwolxfsvaghmpynw") - .withBoxDetectionsPerImage("isubxbteog") - .withBoxScoreThreshold("fiijrykwlefksxqc") - .withImageSize("zfpxgnmqvzvluy") - .withMaxSize("aiossscyvaifp") - .withMinSize("acvfyeowps") - .withModelSize("tjdhsoymhpvtyq") - .withMultiScale("tehdpboujs") - .withNmsIouThreshold("fvvdshxcdedsue") - .withTileGridSize("gnxcgjtfrnquktr") - .withTileOverlapRatio("s") - .withTilePredictionsNmsThreshold("lr") - .withValidationIouThreshold("myltrwntfmtbg") - .withValidationMetricType("dxwnazkurrd"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettingsObjectDetection.class); - Assertions.assertEquals("yzjwhsetwwjwzzq", model.amsGradient()); - Assertions.assertEquals("uzu", model.augmentations()); - Assertions.assertEquals("y", model.beta1()); - Assertions.assertEquals("yqhyqqzzdcykey", model.beta2()); - Assertions.assertEquals("ewfopazdazg", model.distributed()); - Assertions.assertEquals("qgpewqcfutmdpvoz", model.earlyStopping()); - Assertions.assertEquals("qjbknl", model.earlyStoppingDelay()); - Assertions.assertEquals("lctzeyowmndcovd", model.earlyStoppingPatience()); - Assertions.assertEquals("qauxzan", model.enableOnnxNormalization()); - Assertions.assertEquals("kvfruwkudr", model.evaluationFrequency()); - Assertions.assertEquals("pftxudqyeme", model.gradientAccumulationStep()); - Assertions.assertEquals("naucmcirtnee", model.layersToFreeze()); - Assertions.assertEquals("jauwcgxefnohaitr", model.learningRate()); - Assertions.assertEquals("izerw", model.learningRateScheduler()); - Assertions.assertEquals("dasmxu", model.modelName()); - Assertions.assertEquals("fbngfcocef", model.momentum()); - Assertions.assertEquals("riylfmpztra", model.nesterov()); - Assertions.assertEquals("svhl", model.numberOfEpochs()); - Assertions.assertEquals("culregpqt", model.numberOfWorkers()); - Assertions.assertEquals("jhvrztnvgyshqrdg", model.optimizer()); - Assertions.assertEquals("wmewjzlpyk", model.randomSeed()); - Assertions.assertEquals("azzwjcay", model.stepLRGamma()); - Assertions.assertEquals("zrransyb", model.stepLRStepSize()); - Assertions.assertEquals("polwzrghsrlei", model.trainingBatchSize()); - Assertions.assertEquals("fscjfn", model.validationBatchSize()); - Assertions.assertEquals("wvuagfqwtl", model.warmupCosineLRCycles()); - Assertions.assertEquals("gvmreuptrklzmi", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("jwolxfsvaghmpynw", model.weightDecay()); - Assertions.assertEquals("isubxbteog", model.boxDetectionsPerImage()); - Assertions.assertEquals("fiijrykwlefksxqc", model.boxScoreThreshold()); - Assertions.assertEquals("zfpxgnmqvzvluy", model.imageSize()); - Assertions.assertEquals("aiossscyvaifp", model.maxSize()); - Assertions.assertEquals("acvfyeowps", model.minSize()); - Assertions.assertEquals("tjdhsoymhpvtyq", model.modelSize()); - Assertions.assertEquals("tehdpboujs", model.multiScale()); - Assertions.assertEquals("fvvdshxcdedsue", model.nmsIouThreshold()); - Assertions.assertEquals("gnxcgjtfrnquktr", model.tileGridSize()); - Assertions.assertEquals("s", model.tileOverlapRatio()); - Assertions.assertEquals("lr", model.tilePredictionsNmsThreshold()); - Assertions.assertEquals("myltrwntfmtbg", model.validationIouThreshold()); - Assertions.assertEquals("dxwnazkurrd", model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.java deleted file mode 100644 index eff5f61e7e72..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelDistributionSettingsTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettings; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelDistributionSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelDistributionSettings model = - BinaryData - .fromString( - "{\"amsGradient\":\"v\",\"augmentations\":\"i\",\"beta1\":\"qzlgcndhzxrrfcfs\",\"beta2\":\"khgsnxuwwkpphefs\",\"distributed\":\"xlb\",\"earlyStopping\":\"omeikjcl\",\"earlyStoppingDelay\":\"acnmwpfsuqtaaz\",\"earlyStoppingPatience\":\"bxyxoy\",\"enableOnnxNormalization\":\"uqqiqezxlhd\",\"evaluationFrequency\":\"qdcadwvps\",\"gradientAccumulationStep\":\"j\",\"layersToFreeze\":\"hjriyb\",\"learningRate\":\"zo\",\"learningRateScheduler\":\"nxwdvwnjkg\",\"modelName\":\"nmx\",\"momentum\":\"rsqftib\",\"nesterov\":\"ibuyvpirf\",\"numberOfEpochs\":\"pnqn\",\"numberOfWorkers\":\"w\",\"optimizer\":\"edenrexkxbhxv\",\"randomSeed\":\"nul\",\"stepLRGamma\":\"nhj\",\"stepLRStepSize\":\"dyznfajsvks\",\"trainingBatchSize\":\"qozzkivyhjrliizj\",\"validationBatchSize\":\"lqfhefkwabs\",\"warmupCosineLRCycles\":\"ron\",\"warmupCosineLRWarmupEpochs\":\"lmgnlqxsjx\",\"weightDecay\":\"lexhv\"}") - .toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("v", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("qzlgcndhzxrrfcfs", model.beta1()); - Assertions.assertEquals("khgsnxuwwkpphefs", model.beta2()); - Assertions.assertEquals("xlb", model.distributed()); - Assertions.assertEquals("omeikjcl", model.earlyStopping()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.earlyStoppingDelay()); - Assertions.assertEquals("bxyxoy", model.earlyStoppingPatience()); - Assertions.assertEquals("uqqiqezxlhd", model.enableOnnxNormalization()); - Assertions.assertEquals("qdcadwvps", model.evaluationFrequency()); - Assertions.assertEquals("j", model.gradientAccumulationStep()); - Assertions.assertEquals("hjriyb", model.layersToFreeze()); - Assertions.assertEquals("zo", model.learningRate()); - Assertions.assertEquals("nxwdvwnjkg", model.learningRateScheduler()); - Assertions.assertEquals("nmx", model.modelName()); - Assertions.assertEquals("rsqftib", model.momentum()); - Assertions.assertEquals("ibuyvpirf", model.nesterov()); - Assertions.assertEquals("pnqn", model.numberOfEpochs()); - Assertions.assertEquals("w", model.numberOfWorkers()); - Assertions.assertEquals("edenrexkxbhxv", model.optimizer()); - Assertions.assertEquals("nul", model.randomSeed()); - Assertions.assertEquals("nhj", model.stepLRGamma()); - Assertions.assertEquals("dyznfajsvks", model.stepLRStepSize()); - Assertions.assertEquals("qozzkivyhjrliizj", model.trainingBatchSize()); - Assertions.assertEquals("lqfhefkwabs", model.validationBatchSize()); - Assertions.assertEquals("ron", model.warmupCosineLRCycles()); - Assertions.assertEquals("lmgnlqxsjx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("lexhv", model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelDistributionSettings model = - new ImageModelDistributionSettings() - .withAmsGradient("v") - .withAugmentations("i") - .withBeta1("qzlgcndhzxrrfcfs") - .withBeta2("khgsnxuwwkpphefs") - .withDistributed("xlb") - .withEarlyStopping("omeikjcl") - .withEarlyStoppingDelay("acnmwpfsuqtaaz") - .withEarlyStoppingPatience("bxyxoy") - .withEnableOnnxNormalization("uqqiqezxlhd") - .withEvaluationFrequency("qdcadwvps") - .withGradientAccumulationStep("j") - .withLayersToFreeze("hjriyb") - .withLearningRate("zo") - .withLearningRateScheduler("nxwdvwnjkg") - .withModelName("nmx") - .withMomentum("rsqftib") - .withNesterov("ibuyvpirf") - .withNumberOfEpochs("pnqn") - .withNumberOfWorkers("w") - .withOptimizer("edenrexkxbhxv") - .withRandomSeed("nul") - .withStepLRGamma("nhj") - .withStepLRStepSize("dyznfajsvks") - .withTrainingBatchSize("qozzkivyhjrliizj") - .withValidationBatchSize("lqfhefkwabs") - .withWarmupCosineLRCycles("ron") - .withWarmupCosineLRWarmupEpochs("lmgnlqxsjx") - .withWeightDecay("lexhv"); - model = BinaryData.fromObject(model).toObject(ImageModelDistributionSettings.class); - Assertions.assertEquals("v", model.amsGradient()); - Assertions.assertEquals("i", model.augmentations()); - Assertions.assertEquals("qzlgcndhzxrrfcfs", model.beta1()); - Assertions.assertEquals("khgsnxuwwkpphefs", model.beta2()); - Assertions.assertEquals("xlb", model.distributed()); - Assertions.assertEquals("omeikjcl", model.earlyStopping()); - Assertions.assertEquals("acnmwpfsuqtaaz", model.earlyStoppingDelay()); - Assertions.assertEquals("bxyxoy", model.earlyStoppingPatience()); - Assertions.assertEquals("uqqiqezxlhd", model.enableOnnxNormalization()); - Assertions.assertEquals("qdcadwvps", model.evaluationFrequency()); - Assertions.assertEquals("j", model.gradientAccumulationStep()); - Assertions.assertEquals("hjriyb", model.layersToFreeze()); - Assertions.assertEquals("zo", model.learningRate()); - Assertions.assertEquals("nxwdvwnjkg", model.learningRateScheduler()); - Assertions.assertEquals("nmx", model.modelName()); - Assertions.assertEquals("rsqftib", model.momentum()); - Assertions.assertEquals("ibuyvpirf", model.nesterov()); - Assertions.assertEquals("pnqn", model.numberOfEpochs()); - Assertions.assertEquals("w", model.numberOfWorkers()); - Assertions.assertEquals("edenrexkxbhxv", model.optimizer()); - Assertions.assertEquals("nul", model.randomSeed()); - Assertions.assertEquals("nhj", model.stepLRGamma()); - Assertions.assertEquals("dyznfajsvks", model.stepLRStepSize()); - Assertions.assertEquals("qozzkivyhjrliizj", model.trainingBatchSize()); - Assertions.assertEquals("lqfhefkwabs", model.validationBatchSize()); - Assertions.assertEquals("ron", model.warmupCosineLRCycles()); - Assertions.assertEquals("lmgnlqxsjx", model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("lexhv", model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java deleted file mode 100644 index 5f68719c85e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsClassificationTests.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsClassification; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsClassification model = - BinaryData - .fromString( - "{\"trainingCropSize\":1924497192,\"validationCropSize\":919883073,\"validationResizeSize\":1735818040,\"weightedLoss\":2030366014,\"advancedSettings\":\"tuicds\",\"amsGradient\":true,\"augmentations\":\"m\",\"beta1\":59.436913,\"beta2\":62.807377,\"checkpointFrequency\":1080891031,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"rgyngydgrpxnca\",\"description\":\"qao\"},\"checkpointRunId\":\"jrkc\",\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1511007702,\"earlyStoppingPatience\":1521830595,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1183182643,\"gradientAccumulationStep\":588395160,\"layersToFreeze\":1092712252,\"learningRate\":63.37043,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"gxhqfgqkayejs\",\"momentum\":38.807606,\"nesterov\":true,\"numberOfEpochs\":390611386,\"numberOfWorkers\":883853554,\"optimizer\":\"None\",\"randomSeed\":9965556,\"stepLRGamma\":33.88037,\"stepLRStepSize\":1346771342,\"trainingBatchSize\":1977652281,\"validationBatchSize\":503751381,\"warmupCosineLRCycles\":23.360283,\"warmupCosineLRWarmupEpochs\":1142072535,\"weightDecay\":68.338776}") - .toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals("tuicds", model.advancedSettings()); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("m", model.augmentations()); - Assertions.assertEquals(59.436913F, model.beta1()); - Assertions.assertEquals(62.807377F, model.beta2()); - Assertions.assertEquals(1080891031, model.checkpointFrequency()); - Assertions.assertEquals("qao", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("rgyngydgrpxnca", model.checkpointModel().uri()); - Assertions.assertEquals("jrkc", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1511007702, model.earlyStoppingDelay()); - Assertions.assertEquals(1521830595, model.earlyStoppingPatience()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1183182643, model.evaluationFrequency()); - Assertions.assertEquals(588395160, model.gradientAccumulationStep()); - Assertions.assertEquals(1092712252, model.layersToFreeze()); - Assertions.assertEquals(63.37043F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("gxhqfgqkayejs", model.modelName()); - Assertions.assertEquals(38.807606F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(390611386, model.numberOfEpochs()); - Assertions.assertEquals(883853554, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(9965556, model.randomSeed()); - Assertions.assertEquals(33.88037F, model.stepLRGamma()); - Assertions.assertEquals(1346771342, model.stepLRStepSize()); - Assertions.assertEquals(1977652281, model.trainingBatchSize()); - Assertions.assertEquals(503751381, model.validationBatchSize()); - Assertions.assertEquals(23.360283F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1142072535, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(68.338776F, model.weightDecay()); - Assertions.assertEquals(1924497192, model.trainingCropSize()); - Assertions.assertEquals(919883073, model.validationCropSize()); - Assertions.assertEquals(1735818040, model.validationResizeSize()); - Assertions.assertEquals(2030366014, model.weightedLoss()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsClassification model = - new ImageModelSettingsClassification() - .withAdvancedSettings("tuicds") - .withAmsGradient(true) - .withAugmentations("m") - .withBeta1(59.436913F) - .withBeta2(62.807377F) - .withCheckpointFrequency(1080891031) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("qao") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("rgyngydgrpxnca")) - .withCheckpointRunId("jrkc") - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1511007702) - .withEarlyStoppingPatience(1521830595) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1183182643) - .withGradientAccumulationStep(588395160) - .withLayersToFreeze(1092712252) - .withLearningRate(63.37043F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("gxhqfgqkayejs") - .withMomentum(38.807606F) - .withNesterov(true) - .withNumberOfEpochs(390611386) - .withNumberOfWorkers(883853554) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(9965556) - .withStepLRGamma(33.88037F) - .withStepLRStepSize(1346771342) - .withTrainingBatchSize(1977652281) - .withValidationBatchSize(503751381) - .withWarmupCosineLRCycles(23.360283F) - .withWarmupCosineLRWarmupEpochs(1142072535) - .withWeightDecay(68.338776F) - .withTrainingCropSize(1924497192) - .withValidationCropSize(919883073) - .withValidationResizeSize(1735818040) - .withWeightedLoss(2030366014); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsClassification.class); - Assertions.assertEquals("tuicds", model.advancedSettings()); - Assertions.assertEquals(true, model.amsGradient()); - Assertions.assertEquals("m", model.augmentations()); - Assertions.assertEquals(59.436913F, model.beta1()); - Assertions.assertEquals(62.807377F, model.beta2()); - Assertions.assertEquals(1080891031, model.checkpointFrequency()); - Assertions.assertEquals("qao", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("rgyngydgrpxnca", model.checkpointModel().uri()); - Assertions.assertEquals("jrkc", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1511007702, model.earlyStoppingDelay()); - Assertions.assertEquals(1521830595, model.earlyStoppingPatience()); - Assertions.assertEquals(true, model.enableOnnxNormalization()); - Assertions.assertEquals(1183182643, model.evaluationFrequency()); - Assertions.assertEquals(588395160, model.gradientAccumulationStep()); - Assertions.assertEquals(1092712252, model.layersToFreeze()); - Assertions.assertEquals(63.37043F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("gxhqfgqkayejs", model.modelName()); - Assertions.assertEquals(38.807606F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(390611386, model.numberOfEpochs()); - Assertions.assertEquals(883853554, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(9965556, model.randomSeed()); - Assertions.assertEquals(33.88037F, model.stepLRGamma()); - Assertions.assertEquals(1346771342, model.stepLRStepSize()); - Assertions.assertEquals(1977652281, model.trainingBatchSize()); - Assertions.assertEquals(503751381, model.validationBatchSize()); - Assertions.assertEquals(23.360283F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1142072535, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(68.338776F, model.weightDecay()); - Assertions.assertEquals(1924497192, model.trainingCropSize()); - Assertions.assertEquals(919883073, model.validationCropSize()); - Assertions.assertEquals(1735818040, model.validationResizeSize()); - Assertions.assertEquals(2030366014, model.weightedLoss()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.java deleted file mode 100644 index 71eeb6333153..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsObjectDetectionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettingsObjectDetection model = - BinaryData - .fromString( - "{\"boxDetectionsPerImage\":101641984,\"boxScoreThreshold\":16.755789,\"imageSize\":1076058960,\"maxSize\":191759687,\"minSize\":1378586528,\"modelSize\":\"ExtraLarge\",\"multiScale\":true,\"nmsIouThreshold\":18.348568,\"tileGridSize\":\"ljzgdy\",\"tileOverlapRatio\":96.23886,\"tilePredictionsNmsThreshold\":36.949356,\"validationIouThreshold\":45.30077,\"validationMetricType\":\"CocoVoc\",\"advancedSettings\":\"rqhbjnqogdxwbsfp\",\"amsGradient\":false,\"augmentations\":\"jlf\",\"beta1\":75.122604,\"beta2\":77.73417,\"checkpointFrequency\":1341111685,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"jluxxdhi\",\"description\":\"zd\"},\"checkpointRunId\":\"qjm\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":954713869,\"earlyStoppingPatience\":1623513694,\"enableOnnxNormalization\":false,\"evaluationFrequency\":1227246383,\"gradientAccumulationStep\":445418051,\"layersToFreeze\":1633383721,\"learningRate\":20.159918,\"learningRateScheduler\":\"WarmupCosine\",\"modelName\":\"znkcqwwxwjy\",\"momentum\":68.34347,\"nesterov\":true,\"numberOfEpochs\":370561675,\"numberOfWorkers\":561740795,\"optimizer\":\"None\",\"randomSeed\":1563473495,\"stepLRGamma\":32.891335,\"stepLRStepSize\":795985008,\"trainingBatchSize\":485145114,\"validationBatchSize\":638318099,\"warmupCosineLRCycles\":34.38207,\"warmupCosineLRWarmupEpochs\":771716822,\"weightDecay\":76.72818}") - .toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals("rqhbjnqogdxwbsfp", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("jlf", model.augmentations()); - Assertions.assertEquals(75.122604F, model.beta1()); - Assertions.assertEquals(77.73417F, model.beta2()); - Assertions.assertEquals(1341111685, model.checkpointFrequency()); - Assertions.assertEquals("zd", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("jluxxdhi", model.checkpointModel().uri()); - Assertions.assertEquals("qjm", model.checkpointRunId()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(954713869, model.earlyStoppingDelay()); - Assertions.assertEquals(1623513694, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(1227246383, model.evaluationFrequency()); - Assertions.assertEquals(445418051, model.gradientAccumulationStep()); - Assertions.assertEquals(1633383721, model.layersToFreeze()); - Assertions.assertEquals(20.159918F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("znkcqwwxwjy", model.modelName()); - Assertions.assertEquals(68.34347F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(370561675, model.numberOfEpochs()); - Assertions.assertEquals(561740795, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1563473495, model.randomSeed()); - Assertions.assertEquals(32.891335F, model.stepLRGamma()); - Assertions.assertEquals(795985008, model.stepLRStepSize()); - Assertions.assertEquals(485145114, model.trainingBatchSize()); - Assertions.assertEquals(638318099, model.validationBatchSize()); - Assertions.assertEquals(34.38207F, model.warmupCosineLRCycles()); - Assertions.assertEquals(771716822, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(76.72818F, model.weightDecay()); - Assertions.assertEquals(101641984, model.boxDetectionsPerImage()); - Assertions.assertEquals(16.755789F, model.boxScoreThreshold()); - Assertions.assertEquals(1076058960, model.imageSize()); - Assertions.assertEquals(191759687, model.maxSize()); - Assertions.assertEquals(1378586528, model.minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSize()); - Assertions.assertEquals(true, model.multiScale()); - Assertions.assertEquals(18.348568F, model.nmsIouThreshold()); - Assertions.assertEquals("ljzgdy", model.tileGridSize()); - Assertions.assertEquals(96.23886F, model.tileOverlapRatio()); - Assertions.assertEquals(36.949356F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(45.30077F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettingsObjectDetection model = - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("rqhbjnqogdxwbsfp") - .withAmsGradient(false) - .withAugmentations("jlf") - .withBeta1(75.122604F) - .withBeta2(77.73417F) - .withCheckpointFrequency(1341111685) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("zd") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("jluxxdhi")) - .withCheckpointRunId("qjm") - .withDistributed(false) - .withEarlyStopping(false) - .withEarlyStoppingDelay(954713869) - .withEarlyStoppingPatience(1623513694) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(1227246383) - .withGradientAccumulationStep(445418051) - .withLayersToFreeze(1633383721) - .withLearningRate(20.159918F) - .withLearningRateScheduler(LearningRateScheduler.WARMUP_COSINE) - .withModelName("znkcqwwxwjy") - .withMomentum(68.34347F) - .withNesterov(true) - .withNumberOfEpochs(370561675) - .withNumberOfWorkers(561740795) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(1563473495) - .withStepLRGamma(32.891335F) - .withStepLRStepSize(795985008) - .withTrainingBatchSize(485145114) - .withValidationBatchSize(638318099) - .withWarmupCosineLRCycles(34.38207F) - .withWarmupCosineLRWarmupEpochs(771716822) - .withWeightDecay(76.72818F) - .withBoxDetectionsPerImage(101641984) - .withBoxScoreThreshold(16.755789F) - .withImageSize(1076058960) - .withMaxSize(191759687) - .withMinSize(1378586528) - .withModelSize(ModelSize.EXTRA_LARGE) - .withMultiScale(true) - .withNmsIouThreshold(18.348568F) - .withTileGridSize("ljzgdy") - .withTileOverlapRatio(96.23886F) - .withTilePredictionsNmsThreshold(36.949356F) - .withValidationIouThreshold(45.30077F) - .withValidationMetricType(ValidationMetricType.COCO_VOC); - model = BinaryData.fromObject(model).toObject(ImageModelSettingsObjectDetection.class); - Assertions.assertEquals("rqhbjnqogdxwbsfp", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("jlf", model.augmentations()); - Assertions.assertEquals(75.122604F, model.beta1()); - Assertions.assertEquals(77.73417F, model.beta2()); - Assertions.assertEquals(1341111685, model.checkpointFrequency()); - Assertions.assertEquals("zd", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("jluxxdhi", model.checkpointModel().uri()); - Assertions.assertEquals("qjm", model.checkpointRunId()); - Assertions.assertEquals(false, model.distributed()); - Assertions.assertEquals(false, model.earlyStopping()); - Assertions.assertEquals(954713869, model.earlyStoppingDelay()); - Assertions.assertEquals(1623513694, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(1227246383, model.evaluationFrequency()); - Assertions.assertEquals(445418051, model.gradientAccumulationStep()); - Assertions.assertEquals(1633383721, model.layersToFreeze()); - Assertions.assertEquals(20.159918F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.WARMUP_COSINE, model.learningRateScheduler()); - Assertions.assertEquals("znkcqwwxwjy", model.modelName()); - Assertions.assertEquals(68.34347F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(370561675, model.numberOfEpochs()); - Assertions.assertEquals(561740795, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(1563473495, model.randomSeed()); - Assertions.assertEquals(32.891335F, model.stepLRGamma()); - Assertions.assertEquals(795985008, model.stepLRStepSize()); - Assertions.assertEquals(485145114, model.trainingBatchSize()); - Assertions.assertEquals(638318099, model.validationBatchSize()); - Assertions.assertEquals(34.38207F, model.warmupCosineLRCycles()); - Assertions.assertEquals(771716822, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(76.72818F, model.weightDecay()); - Assertions.assertEquals(101641984, model.boxDetectionsPerImage()); - Assertions.assertEquals(16.755789F, model.boxScoreThreshold()); - Assertions.assertEquals(1076058960, model.imageSize()); - Assertions.assertEquals(191759687, model.maxSize()); - Assertions.assertEquals(1378586528, model.minSize()); - Assertions.assertEquals(ModelSize.EXTRA_LARGE, model.modelSize()); - Assertions.assertEquals(true, model.multiScale()); - Assertions.assertEquals(18.348568F, model.nmsIouThreshold()); - Assertions.assertEquals("ljzgdy", model.tileGridSize()); - Assertions.assertEquals(96.23886F, model.tileOverlapRatio()); - Assertions.assertEquals(36.949356F, model.tilePredictionsNmsThreshold()); - Assertions.assertEquals(45.30077F, model.validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.COCO_VOC, model.validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.java deleted file mode 100644 index 432642cac511..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageModelSettingsTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import org.junit.jupiter.api.Assertions; - -public final class ImageModelSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageModelSettings model = - BinaryData - .fromString( - "{\"advancedSettings\":\"va\",\"amsGradient\":false,\"augmentations\":\"zknxkv\",\"beta1\":37.521465,\"beta2\":75.73106,\"checkpointFrequency\":2099620376,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"mignohikkg\",\"description\":\"g\"},\"checkpointRunId\":\"pinde\",\"distributed\":true,\"earlyStopping\":true,\"earlyStoppingDelay\":1931875786,\"earlyStoppingPatience\":1421822703,\"enableOnnxNormalization\":false,\"evaluationFrequency\":785027108,\"gradientAccumulationStep\":332997027,\"layersToFreeze\":1895771662,\"learningRate\":85.75601,\"learningRateScheduler\":\"None\",\"modelName\":\"zir\",\"momentum\":31.809593,\"nesterov\":true,\"numberOfEpochs\":1519861948,\"numberOfWorkers\":833365863,\"optimizer\":\"None\",\"randomSeed\":688700290,\"stepLRGamma\":36.495888,\"stepLRStepSize\":829672692,\"trainingBatchSize\":1420035701,\"validationBatchSize\":450644888,\"warmupCosineLRCycles\":51.71764,\"warmupCosineLRWarmupEpochs\":1150687421,\"weightDecay\":80.28705}") - .toObject(ImageModelSettings.class); - Assertions.assertEquals("va", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("zknxkv", model.augmentations()); - Assertions.assertEquals(37.521465F, model.beta1()); - Assertions.assertEquals(75.73106F, model.beta2()); - Assertions.assertEquals(2099620376, model.checkpointFrequency()); - Assertions.assertEquals("g", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("mignohikkg", model.checkpointModel().uri()); - Assertions.assertEquals("pinde", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1931875786, model.earlyStoppingDelay()); - Assertions.assertEquals(1421822703, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(785027108, model.evaluationFrequency()); - Assertions.assertEquals(332997027, model.gradientAccumulationStep()); - Assertions.assertEquals(1895771662, model.layersToFreeze()); - Assertions.assertEquals(85.75601F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("zir", model.modelName()); - Assertions.assertEquals(31.809593F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(1519861948, model.numberOfEpochs()); - Assertions.assertEquals(833365863, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(688700290, model.randomSeed()); - Assertions.assertEquals(36.495888F, model.stepLRGamma()); - Assertions.assertEquals(829672692, model.stepLRStepSize()); - Assertions.assertEquals(1420035701, model.trainingBatchSize()); - Assertions.assertEquals(450644888, model.validationBatchSize()); - Assertions.assertEquals(51.71764F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1150687421, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.28705F, model.weightDecay()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageModelSettings model = - new ImageModelSettings() - .withAdvancedSettings("va") - .withAmsGradient(false) - .withAugmentations("zknxkv") - .withBeta1(37.521465F) - .withBeta2(75.73106F) - .withCheckpointFrequency(2099620376) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("g") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("mignohikkg")) - .withCheckpointRunId("pinde") - .withDistributed(true) - .withEarlyStopping(true) - .withEarlyStoppingDelay(1931875786) - .withEarlyStoppingPatience(1421822703) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(785027108) - .withGradientAccumulationStep(332997027) - .withLayersToFreeze(1895771662) - .withLearningRate(85.75601F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("zir") - .withMomentum(31.809593F) - .withNesterov(true) - .withNumberOfEpochs(1519861948) - .withNumberOfWorkers(833365863) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(688700290) - .withStepLRGamma(36.495888F) - .withStepLRStepSize(829672692) - .withTrainingBatchSize(1420035701) - .withValidationBatchSize(450644888) - .withWarmupCosineLRCycles(51.71764F) - .withWarmupCosineLRWarmupEpochs(1150687421) - .withWeightDecay(80.28705F); - model = BinaryData.fromObject(model).toObject(ImageModelSettings.class); - Assertions.assertEquals("va", model.advancedSettings()); - Assertions.assertEquals(false, model.amsGradient()); - Assertions.assertEquals("zknxkv", model.augmentations()); - Assertions.assertEquals(37.521465F, model.beta1()); - Assertions.assertEquals(75.73106F, model.beta2()); - Assertions.assertEquals(2099620376, model.checkpointFrequency()); - Assertions.assertEquals("g", model.checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.checkpointModel().mode()); - Assertions.assertEquals("mignohikkg", model.checkpointModel().uri()); - Assertions.assertEquals("pinde", model.checkpointRunId()); - Assertions.assertEquals(true, model.distributed()); - Assertions.assertEquals(true, model.earlyStopping()); - Assertions.assertEquals(1931875786, model.earlyStoppingDelay()); - Assertions.assertEquals(1421822703, model.earlyStoppingPatience()); - Assertions.assertEquals(false, model.enableOnnxNormalization()); - Assertions.assertEquals(785027108, model.evaluationFrequency()); - Assertions.assertEquals(332997027, model.gradientAccumulationStep()); - Assertions.assertEquals(1895771662, model.layersToFreeze()); - Assertions.assertEquals(85.75601F, model.learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.learningRateScheduler()); - Assertions.assertEquals("zir", model.modelName()); - Assertions.assertEquals(31.809593F, model.momentum()); - Assertions.assertEquals(true, model.nesterov()); - Assertions.assertEquals(1519861948, model.numberOfEpochs()); - Assertions.assertEquals(833365863, model.numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.optimizer()); - Assertions.assertEquals(688700290, model.randomSeed()); - Assertions.assertEquals(36.495888F, model.stepLRGamma()); - Assertions.assertEquals(829672692, model.stepLRStepSize()); - Assertions.assertEquals(1420035701, model.trainingBatchSize()); - Assertions.assertEquals(450644888, model.validationBatchSize()); - Assertions.assertEquals(51.71764F, model.warmupCosineLRCycles()); - Assertions.assertEquals(1150687421, model.warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.28705F, model.weightDecay()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java deleted file mode 100644 index 563ad809fa99..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionBaseTests.java +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetectionBase; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetectionBase model = - BinaryData - .fromString( - "{\"modelSettings\":{\"boxDetectionsPerImage\":220622186,\"boxScoreThreshold\":34.980453,\"imageSize\":1257411321,\"maxSize\":921466837,\"minSize\":2015686275,\"modelSize\":\"None\",\"multiScale\":false,\"nmsIouThreshold\":0.77554584,\"tileGridSize\":\"aohoqkpjtnq\",\"tileOverlapRatio\":5.6527376,\"tilePredictionsNmsThreshold\":62.38328,\"validationIouThreshold\":84.67642,\"validationMetricType\":\"None\",\"advancedSettings\":\"m\",\"amsGradient\":true,\"augmentations\":\"ilm\",\"beta1\":66.63753,\"beta2\":77.31098,\"checkpointFrequency\":1645404857,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"Download\",\"uri\":\"nkkbjpjvlywltmfw\",\"description\":\"bjwhlwyjfnqzocr\"},\"checkpointRunId\":\"gczeuntgx\",\"distributed\":false,\"earlyStopping\":false,\"earlyStoppingDelay\":1555790042,\"earlyStoppingPatience\":1557956860,\"enableOnnxNormalization\":true,\"evaluationFrequency\":1852855933,\"gradientAccumulationStep\":1891446844,\"layersToFreeze\":888077010,\"learningRate\":91.16553,\"learningRateScheduler\":\"None\",\"modelName\":\"xgyrihlgmgbehlqt\",\"momentum\":35.669476,\"nesterov\":true,\"numberOfEpochs\":2104814940,\"numberOfWorkers\":2146718478,\"optimizer\":\"None\",\"randomSeed\":961397870,\"stepLRGamma\":84.43488,\"stepLRStepSize\":1159798592,\"trainingBatchSize\":1968957759,\"validationBatchSize\":1595039473,\"warmupCosineLRCycles\":26.42473,\"warmupCosineLRWarmupEpochs\":1300894444,\"weightDecay\":80.86428},\"searchSpace\":[{\"boxDetectionsPerImage\":\"gsabvcipowzafc\",\"boxScoreThreshold\":\"umljcirvpef\",\"imageSize\":\"dvei\",\"maxSize\":\"tjnsx\",\"minSize\":\"jlnsj\",\"modelSize\":\"ju\",\"multiScale\":\"xbxq\",\"nmsIouThreshold\":\"vuaytuad\",\"tileGridSize\":\"xeqbwp\",\"tileOverlapRatio\":\"ghyksarcdrnxs\",\"tilePredictionsNmsThreshold\":\"vlzladl\",\"validationIouThreshold\":\"kpbqhvfdqqjw\",\"validationMetricType\":\"hwzdanojisgglmv\",\"amsGradient\":\"atuztjct\",\"augmentations\":\"pvbkaehxsmzyg\",\"beta1\":\"wakwseivmakxhys\",\"beta2\":\"ljuxl\",\"distributed\":\"ect\",\"earlyStopping\":\"fjmskdchmaiu\",\"earlyStoppingDelay\":\"vlzw\",\"earlyStoppingPatience\":\"gmfalkzazmgoked\",\"enableOnnxNormalization\":\"qafkmkrokzrth\",\"evaluationFrequency\":\"twpqrtva\",\"gradientAccumulationStep\":\"nqnixiezeagmce\",\"layersToFreeze\":\"uugedhfp\",\"learningRate\":\"tlzm\",\"learningRateScheduler\":\"syjdeolctae\",\"modelName\":\"syrled\",\"momentum\":\"ustbvtqigdx\",\"nesterov\":\"sgeafgfosehx\",\"numberOfEpochs\":\"sxezppkkwaa\",\"numberOfWorkers\":\"k\",\"optimizer\":\"jlpzeqtoyrp\",\"randomSeed\":\"xlaj\",\"stepLRGamma\":\"lpquevhamfow\",\"stepLRStepSize\":\"btmkekxpkzwaq\",\"trainingBatchSize\":\"fqovc\",\"validationBatchSize\":\"qbplvfiduszte\",\"warmupCosineLRCycles\":\"byjgmsfepx\",\"warmupCosineLRWarmupEpochs\":\"hpqadagrhrdicxdw\",\"weightDecay\":\"fowxwyovcxjsgbi\"},{\"boxDetectionsPerImage\":\"ukdveksbuhoduc\",\"boxScoreThreshold\":\"lscrdpibfdyjduss\",\"imageSize\":\"szekbh\",\"maxSize\":\"kaaggkreh\",\"minSize\":\"rnuybffljfii\",\"modelSize\":\"eoagsqta\",\"multiScale\":\"usrexxf\",\"nmsIouThreshold\":\"sqwudohzilfmnli\",\"tileGridSize\":\"simsfeypofqpmb\",\"tileOverlapRatio\":\"qgsdr\",\"tilePredictionsNmsThreshold\":\"ttjxophgerhsmvgo\",\"validationIouThreshold\":\"wzm\",\"validationMetricType\":\"lrixysfnimsq\",\"amsGradient\":\"wwmhkruwae\",\"augmentations\":\"ympmlqoin\",\"beta1\":\"duewihapfj\",\"beta2\":\"knjdiqfliejhp\",\"distributed\":\"bi\",\"earlyStopping\":\"fsbw\",\"earlyStoppingDelay\":\"ivbvzi\",\"earlyStoppingPatience\":\"wxgoooxzpra\",\"enableOnnxNormalization\":\"s\",\"evaluationFrequency\":\"knpdgzigjsu\",\"gradientAccumulationStep\":\"whgsaodkww\",\"layersToFreeze\":\"afoctohz\",\"learningRate\":\"quvwsxbgn\",\"learningRateScheduler\":\"ervqchoadhrsxqvz\",\"modelName\":\"pabdsrg\",\"momentum\":\"jglzrsubklrxhjnl\",\"nesterov\":\"etjdvqydieqqkwa\",\"numberOfEpochs\":\"wdxvqzxoebwg\",\"numberOfWorkers\":\"bibanbau\",\"optimizer\":\"tzvp\",\"randomSeed\":\"lozkxbzrp\",\"stepLRGamma\":\"plssanbtttk\",\"stepLRStepSize\":\"uxunrswg\",\"trainingBatchSize\":\"jhboyikebhuhks\",\"validationBatchSize\":\"wlokhueoijyzcq\",\"warmupCosineLRCycles\":\"zqzu\",\"warmupCosineLRWarmupEpochs\":\"s\",\"weightDecay\":\"ej\"}],\"limitSettings\":{\"maxConcurrentTrials\":1158343098,\"maxTrials\":2133185621,\"timeout\":\"PT173H26M33S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1464302974,\"evaluationInterval\":539908072},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"cf\",\"description\":\"bmxsnxoc\"},\"validationDataSize\":82.41225782753845}") - .toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(2133185621, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout()); - Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("bmxsnxoc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("cf", model.validationData().uri()); - Assertions.assertEquals(82.41225782753845D, model.validationDataSize()); - Assertions.assertEquals("m", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ilm", model.modelSettings().augmentations()); - Assertions.assertEquals(66.63753F, model.modelSettings().beta1()); - Assertions.assertEquals(77.31098F, model.modelSettings().beta2()); - Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(91.16553F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName()); - Assertions.assertEquals(35.669476F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(961397870, model.modelSettings().randomSeed()); - Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay()); - Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1257411321, model.modelSettings().imageSize()); - Assertions.assertEquals(921466837, model.modelSettings().maxSize()); - Assertions.assertEquals(2015686275, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("ect", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetectionBase model = - new ImageObjectDetectionBase() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(1158343098) - .withMaxTrials(2133185621) - .withTimeout(Duration.parse("PT173H26M33S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1464302974) - .withEvaluationInterval(539908072)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID)) - .withValidationData( - new MLTableJobInput() - .withDescription("bmxsnxoc") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("cf")) - .withValidationDataSize(82.41225782753845D) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("m") - .withAmsGradient(true) - .withAugmentations("ilm") - .withBeta1(66.63753F) - .withBeta2(77.31098F) - .withCheckpointFrequency(1645404857) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("bjwhlwyjfnqzocr") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("nkkbjpjvlywltmfw")) - .withCheckpointRunId("gczeuntgx") - .withDistributed(false) - .withEarlyStopping(false) - .withEarlyStoppingDelay(1555790042) - .withEarlyStoppingPatience(1557956860) - .withEnableOnnxNormalization(true) - .withEvaluationFrequency(1852855933) - .withGradientAccumulationStep(1891446844) - .withLayersToFreeze(888077010) - .withLearningRate(91.16553F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("xgyrihlgmgbehlqt") - .withMomentum(35.669476F) - .withNesterov(true) - .withNumberOfEpochs(2104814940) - .withNumberOfWorkers(2146718478) - .withOptimizer(StochasticOptimizer.NONE) - .withRandomSeed(961397870) - .withStepLRGamma(84.43488F) - .withStepLRStepSize(1159798592) - .withTrainingBatchSize(1968957759) - .withValidationBatchSize(1595039473) - .withWarmupCosineLRCycles(26.42473F) - .withWarmupCosineLRWarmupEpochs(1300894444) - .withWeightDecay(80.86428F) - .withBoxDetectionsPerImage(220622186) - .withBoxScoreThreshold(34.980453F) - .withImageSize(1257411321) - .withMaxSize(921466837) - .withMinSize(2015686275) - .withModelSize(ModelSize.NONE) - .withMultiScale(false) - .withNmsIouThreshold(0.77554584F) - .withTileGridSize("aohoqkpjtnq") - .withTileOverlapRatio(5.6527376F) - .withTilePredictionsNmsThreshold(62.38328F) - .withValidationIouThreshold(84.67642F) - .withValidationMetricType(ValidationMetricType.NONE)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("atuztjct") - .withAugmentations("pvbkaehxsmzyg") - .withBeta1("wakwseivmakxhys") - .withBeta2("ljuxl") - .withDistributed("ect") - .withEarlyStopping("fjmskdchmaiu") - .withEarlyStoppingDelay("vlzw") - .withEarlyStoppingPatience("gmfalkzazmgoked") - .withEnableOnnxNormalization("qafkmkrokzrth") - .withEvaluationFrequency("twpqrtva") - .withGradientAccumulationStep("nqnixiezeagmce") - .withLayersToFreeze("uugedhfp") - .withLearningRate("tlzm") - .withLearningRateScheduler("syjdeolctae") - .withModelName("syrled") - .withMomentum("ustbvtqigdx") - .withNesterov("sgeafgfosehx") - .withNumberOfEpochs("sxezppkkwaa") - .withNumberOfWorkers("k") - .withOptimizer("jlpzeqtoyrp") - .withRandomSeed("xlaj") - .withStepLRGamma("lpquevhamfow") - .withStepLRStepSize("btmkekxpkzwaq") - .withTrainingBatchSize("fqovc") - .withValidationBatchSize("qbplvfiduszte") - .withWarmupCosineLRCycles("byjgmsfepx") - .withWarmupCosineLRWarmupEpochs("hpqadagrhrdicxdw") - .withWeightDecay("fowxwyovcxjsgbi") - .withBoxDetectionsPerImage("gsabvcipowzafc") - .withBoxScoreThreshold("umljcirvpef") - .withImageSize("dvei") - .withMaxSize("tjnsx") - .withMinSize("jlnsj") - .withModelSize("ju") - .withMultiScale("xbxq") - .withNmsIouThreshold("vuaytuad") - .withTileGridSize("xeqbwp") - .withTileOverlapRatio("ghyksarcdrnxs") - .withTilePredictionsNmsThreshold("vlzladl") - .withValidationIouThreshold("kpbqhvfdqqjw") - .withValidationMetricType("hwzdanojisgglmv"), - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("wwmhkruwae") - .withAugmentations("ympmlqoin") - .withBeta1("duewihapfj") - .withBeta2("knjdiqfliejhp") - .withDistributed("bi") - .withEarlyStopping("fsbw") - .withEarlyStoppingDelay("ivbvzi") - .withEarlyStoppingPatience("wxgoooxzpra") - .withEnableOnnxNormalization("s") - .withEvaluationFrequency("knpdgzigjsu") - .withGradientAccumulationStep("whgsaodkww") - .withLayersToFreeze("afoctohz") - .withLearningRate("quvwsxbgn") - .withLearningRateScheduler("ervqchoadhrsxqvz") - .withModelName("pabdsrg") - .withMomentum("jglzrsubklrxhjnl") - .withNesterov("etjdvqydieqqkwa") - .withNumberOfEpochs("wdxvqzxoebwg") - .withNumberOfWorkers("bibanbau") - .withOptimizer("tzvp") - .withRandomSeed("lozkxbzrp") - .withStepLRGamma("plssanbtttk") - .withStepLRStepSize("uxunrswg") - .withTrainingBatchSize("jhboyikebhuhks") - .withValidationBatchSize("wlokhueoijyzcq") - .withWarmupCosineLRCycles("zqzu") - .withWarmupCosineLRWarmupEpochs("s") - .withWeightDecay("ej") - .withBoxDetectionsPerImage("ukdveksbuhoduc") - .withBoxScoreThreshold("lscrdpibfdyjduss") - .withImageSize("szekbh") - .withMaxSize("kaaggkreh") - .withMinSize("rnuybffljfii") - .withModelSize("eoagsqta") - .withMultiScale("usrexxf") - .withNmsIouThreshold("sqwudohzilfmnli") - .withTileGridSize("simsfeypofqpmb") - .withTileOverlapRatio("qgsdr") - .withTilePredictionsNmsThreshold("ttjxophgerhsmvgo") - .withValidationIouThreshold("wzm") - .withValidationMetricType("lrixysfnimsq"))); - model = BinaryData.fromObject(model).toObject(ImageObjectDetectionBase.class); - Assertions.assertEquals(1158343098, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(2133185621, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT173H26M33S"), model.limitSettings().timeout()); - Assertions.assertEquals(1464302974, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(539908072, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("bmxsnxoc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("cf", model.validationData().uri()); - Assertions.assertEquals(82.41225782753845D, model.validationDataSize()); - Assertions.assertEquals("m", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("ilm", model.modelSettings().augmentations()); - Assertions.assertEquals(66.63753F, model.modelSettings().beta1()); - Assertions.assertEquals(77.31098F, model.modelSettings().beta2()); - Assertions.assertEquals(1645404857, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("bjwhlwyjfnqzocr", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("nkkbjpjvlywltmfw", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("gczeuntgx", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(false, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1555790042, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(1557956860, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(true, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(1852855933, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1891446844, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(888077010, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(91.16553F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("xgyrihlgmgbehlqt", model.modelSettings().modelName()); - Assertions.assertEquals(35.669476F, model.modelSettings().momentum()); - Assertions.assertEquals(true, model.modelSettings().nesterov()); - Assertions.assertEquals(2104814940, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(2146718478, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.NONE, model.modelSettings().optimizer()); - Assertions.assertEquals(961397870, model.modelSettings().randomSeed()); - Assertions.assertEquals(84.43488F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(1159798592, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1968957759, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(1595039473, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(26.42473F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(1300894444, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(80.86428F, model.modelSettings().weightDecay()); - Assertions.assertEquals(220622186, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(34.980453F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(1257411321, model.modelSettings().imageSize()); - Assertions.assertEquals(921466837, model.modelSettings().maxSize()); - Assertions.assertEquals(2015686275, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.NONE, model.modelSettings().modelSize()); - Assertions.assertEquals(false, model.modelSettings().multiScale()); - Assertions.assertEquals(0.77554584F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("aohoqkpjtnq", model.modelSettings().tileGridSize()); - Assertions.assertEquals(5.6527376F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(62.38328F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(84.67642F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.NONE, model.modelSettings().validationMetricType()); - Assertions.assertEquals("atuztjct", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("pvbkaehxsmzyg", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("wakwseivmakxhys", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("ljuxl", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("ect", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("fjmskdchmaiu", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("vlzw", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("gmfalkzazmgoked", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("qafkmkrokzrth", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("twpqrtva", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("nqnixiezeagmce", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("uugedhfp", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("tlzm", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("syjdeolctae", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("syrled", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("ustbvtqigdx", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("sgeafgfosehx", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("sxezppkkwaa", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("k", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("jlpzeqtoyrp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlaj", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("lpquevhamfow", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("btmkekxpkzwaq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("fqovc", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("qbplvfiduszte", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("byjgmsfepx", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("hpqadagrhrdicxdw", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("fowxwyovcxjsgbi", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("gsabvcipowzafc", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("umljcirvpef", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("dvei", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("tjnsx", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("jlnsj", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("ju", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("xbxq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("vuaytuad", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("xeqbwp", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("ghyksarcdrnxs", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("vlzladl", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("kpbqhvfdqqjw", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("hwzdanojisgglmv", model.searchSpace().get(0).validationMetricType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java deleted file mode 100644 index 020c235748c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageObjectDetectionTests.java +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageModelDistributionSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageModelSettingsObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageObjectDetection; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LearningRateScheduler; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.ModelSize; -import com.azure.resourcemanager.machinelearning.models.ObjectDetectionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import com.azure.resourcemanager.machinelearning.models.StochasticOptimizer; -import com.azure.resourcemanager.machinelearning.models.ValidationMetricType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ImageObjectDetectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageObjectDetection model = - BinaryData - .fromString( - "{\"taskType\":\"ImageObjectDetection\",\"primaryMetric\":\"MeanAveragePrecision\",\"modelSettings\":{\"boxDetectionsPerImage\":667354640,\"boxScoreThreshold\":57.01898,\"imageSize\":920278919,\"maxSize\":546709544,\"minSize\":1447146223,\"modelSize\":\"Large\",\"multiScale\":true,\"nmsIouThreshold\":58.316856,\"tileGridSize\":\"sovyxpavidnievw\",\"tileOverlapRatio\":21.210634,\"tilePredictionsNmsThreshold\":54.720806,\"validationIouThreshold\":27.970045,\"validationMetricType\":\"Voc\",\"advancedSettings\":\"puxgcbdsvalpnpt\",\"amsGradient\":true,\"augmentations\":\"xgpazwugxyqv\",\"beta1\":72.82474,\"beta2\":87.86046,\"checkpointFrequency\":953919104,\"checkpointModel\":{\"jobInputType\":\"mlflow_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"iuhzzgqlmfa\",\"description\":\"z\"},\"checkpointRunId\":\"udjpxpqht\",\"distributed\":true,\"earlyStopping\":false,\"earlyStoppingDelay\":1217471622,\"earlyStoppingPatience\":342924982,\"enableOnnxNormalization\":false,\"evaluationFrequency\":419853623,\"gradientAccumulationStep\":1049447036,\"layersToFreeze\":336351434,\"learningRate\":79.0951,\"learningRateScheduler\":\"None\",\"modelName\":\"uxsp\",\"momentum\":71.59348,\"nesterov\":false,\"numberOfEpochs\":1973063413,\"numberOfWorkers\":1796310561,\"optimizer\":\"Adamw\",\"randomSeed\":1409212705,\"stepLRGamma\":8.159346,\"stepLRStepSize\":99529171,\"trainingBatchSize\":1768553154,\"validationBatchSize\":385248466,\"warmupCosineLRCycles\":70.731415,\"warmupCosineLRWarmupEpochs\":2134877467,\"weightDecay\":72.09128},\"searchSpace\":[{\"boxDetectionsPerImage\":\"axdvwzaehp\",\"boxScoreThreshold\":\"thd\",\"imageSize\":\"mvetatlakfq\",\"maxSize\":\"xwgiks\",\"minSize\":\"vtooxrpo\",\"modelSize\":\"phchgjtnhtukfaci\",\"multiScale\":\"bfntumeezbxvq\",\"nmsIouThreshold\":\"nuvwcgasgomtmjzw\",\"tileGridSize\":\"qgo\",\"tileOverlapRatio\":\"xpwwzt\",\"tilePredictionsNmsThreshold\":\"mkkhtgfredml\",\"validationIouThreshold\":\"grllcc\",\"validationMetricType\":\"ovjowazhpabacom\",\"amsGradient\":\"otgkwsxnsrqorcg\",\"augmentations\":\"mv\",\"beta1\":\"bxeetqujxcxxqn\",\"beta2\":\"qjkedwqurc\",\"distributed\":\"jmrvvxwjongz\",\"earlyStopping\":\"hqqrsilcch\",\"earlyStoppingDelay\":\"xxkan\",\"earlyStoppingPatience\":\"vri\",\"enableOnnxNormalization\":\"gv\",\"evaluationFrequency\":\"jrulfucte\",\"gradientAccumulationStep\":\"thcfj\",\"layersToFreeze\":\"xlyubqjrostv\",\"learningRate\":\"eqmtzzbeqrz\",\"learningRateScheduler\":\"x\",\"modelName\":\"xrd\",\"momentum\":\"bsrwrsnrhpqat\",\"nesterov\":\"kkvyanxk\",\"numberOfEpochs\":\"csemsvuvd\",\"numberOfWorkers\":\"qxetqmmlivrjjx\",\"optimizer\":\"xdchp\",\"randomSeed\":\"xlehzlxpgfquwzp\",\"stepLRGamma\":\"ibelwcerwkw\",\"stepLRStepSize\":\"jxljtxbusq\",\"trainingBatchSize\":\"xxniuisdzhgbd\",\"validationBatchSize\":\"pagsecnad\",\"warmupCosineLRCycles\":\"wqrgxfllmqi\",\"warmupCosineLRWarmupEpochs\":\"ezoell\",\"weightDecay\":\"kiiwvmtu\"}],\"limitSettings\":{\"maxConcurrentTrials\":259319343,\"maxTrials\":1465106108,\"timeout\":\"PT14H16M47S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1028451528,\"evaluationInterval\":1879980006},\"samplingAlgorithm\":\"Bayesian\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"ilrgun\",\"description\":\"nlduwzorxsbm\"},\"validationDataSize\":10.09388413403216,\"logVerbosity\":\"Warning\",\"targetColumnName\":\"mxkqvf\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"dxcltuubwyvpj\",\"description\":\"wcpjqduqgi\"}}") - .toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("mxkqvf", model.targetColumnName()); - Assertions.assertEquals("wcpjqduqgi", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("dxcltuubwyvpj", model.trainingData().uri()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("puxgcbdsvalpnpt", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("xgpazwugxyqv", model.modelSettings().augmentations()); - Assertions.assertEquals(72.82474F, model.modelSettings().beta1()); - Assertions.assertEquals(87.86046F, model.modelSettings().beta2()); - Assertions.assertEquals(953919104, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("z", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("iuhzzgqlmfa", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("udjpxpqht", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1217471622, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(342924982, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(419853623, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1049447036, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(336351434, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(79.0951F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uxsp", model.modelSettings().modelName()); - Assertions.assertEquals(71.59348F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1973063413, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1796310561, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(1409212705, model.modelSettings().randomSeed()); - Assertions.assertEquals(8.159346F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(99529171, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1768553154, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(385248466, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(70.731415F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2134877467, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(72.09128F, model.modelSettings().weightDecay()); - Assertions.assertEquals(667354640, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(57.01898F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(920278919, model.modelSettings().imageSize()); - Assertions.assertEquals(546709544, model.modelSettings().maxSize()); - Assertions.assertEquals(1447146223, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(true, model.modelSettings().multiScale()); - Assertions.assertEquals(58.316856F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sovyxpavidnievw", model.modelSettings().tileGridSize()); - Assertions.assertEquals(21.210634F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(54.720806F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(27.970045F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("otgkwsxnsrqorcg", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("mv", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("bxeetqujxcxxqn", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("qjkedwqurc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("jmrvvxwjongz", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("hqqrsilcch", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("xxkan", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("vri", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("gv", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("jrulfucte", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("thcfj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("xlyubqjrostv", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("eqmtzzbeqrz", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("xrd", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("bsrwrsnrhpqat", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("kkvyanxk", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("csemsvuvd", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qxetqmmlivrjjx", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("xdchp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlehzlxpgfquwzp", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ibelwcerwkw", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jxljtxbusq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xxniuisdzhgbd", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("pagsecnad", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("wqrgxfllmqi", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("ezoell", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kiiwvmtu", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("axdvwzaehp", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("thd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("mvetatlakfq", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("xwgiks", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("vtooxrpo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("phchgjtnhtukfaci", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("bfntumeezbxvq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("nuvwcgasgomtmjzw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qgo", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpwwzt", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("mkkhtgfredml", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("grllcc", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("ovjowazhpabacom", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(259319343, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1465106108, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT14H16M47S"), model.limitSettings().timeout()); - Assertions.assertEquals(1028451528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1879980006, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nlduwzorxsbm", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("ilrgun", model.validationData().uri()); - Assertions.assertEquals(10.09388413403216D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageObjectDetection model = - new ImageObjectDetection() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("mxkqvf") - .withTrainingData( - new MLTableJobInput() - .withDescription("wcpjqduqgi") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("dxcltuubwyvpj")) - .withPrimaryMetric(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION) - .withModelSettings( - new ImageModelSettingsObjectDetection() - .withAdvancedSettings("puxgcbdsvalpnpt") - .withAmsGradient(true) - .withAugmentations("xgpazwugxyqv") - .withBeta1(72.82474F) - .withBeta2(87.86046F) - .withCheckpointFrequency(953919104) - .withCheckpointModel( - new MLFlowModelJobInput() - .withDescription("z") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("iuhzzgqlmfa")) - .withCheckpointRunId("udjpxpqht") - .withDistributed(true) - .withEarlyStopping(false) - .withEarlyStoppingDelay(1217471622) - .withEarlyStoppingPatience(342924982) - .withEnableOnnxNormalization(false) - .withEvaluationFrequency(419853623) - .withGradientAccumulationStep(1049447036) - .withLayersToFreeze(336351434) - .withLearningRate(79.0951F) - .withLearningRateScheduler(LearningRateScheduler.NONE) - .withModelName("uxsp") - .withMomentum(71.59348F) - .withNesterov(false) - .withNumberOfEpochs(1973063413) - .withNumberOfWorkers(1796310561) - .withOptimizer(StochasticOptimizer.ADAMW) - .withRandomSeed(1409212705) - .withStepLRGamma(8.159346F) - .withStepLRStepSize(99529171) - .withTrainingBatchSize(1768553154) - .withValidationBatchSize(385248466) - .withWarmupCosineLRCycles(70.731415F) - .withWarmupCosineLRWarmupEpochs(2134877467) - .withWeightDecay(72.09128F) - .withBoxDetectionsPerImage(667354640) - .withBoxScoreThreshold(57.01898F) - .withImageSize(920278919) - .withMaxSize(546709544) - .withMinSize(1447146223) - .withModelSize(ModelSize.LARGE) - .withMultiScale(true) - .withNmsIouThreshold(58.316856F) - .withTileGridSize("sovyxpavidnievw") - .withTileOverlapRatio(21.210634F) - .withTilePredictionsNmsThreshold(54.720806F) - .withValidationIouThreshold(27.970045F) - .withValidationMetricType(ValidationMetricType.VOC)) - .withSearchSpace( - Arrays - .asList( - new ImageModelDistributionSettingsObjectDetection() - .withAmsGradient("otgkwsxnsrqorcg") - .withAugmentations("mv") - .withBeta1("bxeetqujxcxxqn") - .withBeta2("qjkedwqurc") - .withDistributed("jmrvvxwjongz") - .withEarlyStopping("hqqrsilcch") - .withEarlyStoppingDelay("xxkan") - .withEarlyStoppingPatience("vri") - .withEnableOnnxNormalization("gv") - .withEvaluationFrequency("jrulfucte") - .withGradientAccumulationStep("thcfj") - .withLayersToFreeze("xlyubqjrostv") - .withLearningRate("eqmtzzbeqrz") - .withLearningRateScheduler("x") - .withModelName("xrd") - .withMomentum("bsrwrsnrhpqat") - .withNesterov("kkvyanxk") - .withNumberOfEpochs("csemsvuvd") - .withNumberOfWorkers("qxetqmmlivrjjx") - .withOptimizer("xdchp") - .withRandomSeed("xlehzlxpgfquwzp") - .withStepLRGamma("ibelwcerwkw") - .withStepLRStepSize("jxljtxbusq") - .withTrainingBatchSize("xxniuisdzhgbd") - .withValidationBatchSize("pagsecnad") - .withWarmupCosineLRCycles("wqrgxfllmqi") - .withWarmupCosineLRWarmupEpochs("ezoell") - .withWeightDecay("kiiwvmtu") - .withBoxDetectionsPerImage("axdvwzaehp") - .withBoxScoreThreshold("thd") - .withImageSize("mvetatlakfq") - .withMaxSize("xwgiks") - .withMinSize("vtooxrpo") - .withModelSize("phchgjtnhtukfaci") - .withMultiScale("bfntumeezbxvq") - .withNmsIouThreshold("nuvwcgasgomtmjzw") - .withTileGridSize("qgo") - .withTileOverlapRatio("xpwwzt") - .withTilePredictionsNmsThreshold("mkkhtgfredml") - .withValidationIouThreshold("grllcc") - .withValidationMetricType("ovjowazhpabacom"))) - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(259319343) - .withMaxTrials(1465106108) - .withTimeout(Duration.parse("PT14H16M47S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1028451528) - .withEvaluationInterval(1879980006)) - .withSamplingAlgorithm(SamplingAlgorithmType.BAYESIAN)) - .withValidationData( - new MLTableJobInput() - .withDescription("nlduwzorxsbm") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("ilrgun")) - .withValidationDataSize(10.09388413403216D); - model = BinaryData.fromObject(model).toObject(ImageObjectDetection.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("mxkqvf", model.targetColumnName()); - Assertions.assertEquals("wcpjqduqgi", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("dxcltuubwyvpj", model.trainingData().uri()); - Assertions.assertEquals(ObjectDetectionPrimaryMetrics.MEAN_AVERAGE_PRECISION, model.primaryMetric()); - Assertions.assertEquals("puxgcbdsvalpnpt", model.modelSettings().advancedSettings()); - Assertions.assertEquals(true, model.modelSettings().amsGradient()); - Assertions.assertEquals("xgpazwugxyqv", model.modelSettings().augmentations()); - Assertions.assertEquals(72.82474F, model.modelSettings().beta1()); - Assertions.assertEquals(87.86046F, model.modelSettings().beta2()); - Assertions.assertEquals(953919104, model.modelSettings().checkpointFrequency()); - Assertions.assertEquals("z", model.modelSettings().checkpointModel().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.modelSettings().checkpointModel().mode()); - Assertions.assertEquals("iuhzzgqlmfa", model.modelSettings().checkpointModel().uri()); - Assertions.assertEquals("udjpxpqht", model.modelSettings().checkpointRunId()); - Assertions.assertEquals(true, model.modelSettings().distributed()); - Assertions.assertEquals(false, model.modelSettings().earlyStopping()); - Assertions.assertEquals(1217471622, model.modelSettings().earlyStoppingDelay()); - Assertions.assertEquals(342924982, model.modelSettings().earlyStoppingPatience()); - Assertions.assertEquals(false, model.modelSettings().enableOnnxNormalization()); - Assertions.assertEquals(419853623, model.modelSettings().evaluationFrequency()); - Assertions.assertEquals(1049447036, model.modelSettings().gradientAccumulationStep()); - Assertions.assertEquals(336351434, model.modelSettings().layersToFreeze()); - Assertions.assertEquals(79.0951F, model.modelSettings().learningRate()); - Assertions.assertEquals(LearningRateScheduler.NONE, model.modelSettings().learningRateScheduler()); - Assertions.assertEquals("uxsp", model.modelSettings().modelName()); - Assertions.assertEquals(71.59348F, model.modelSettings().momentum()); - Assertions.assertEquals(false, model.modelSettings().nesterov()); - Assertions.assertEquals(1973063413, model.modelSettings().numberOfEpochs()); - Assertions.assertEquals(1796310561, model.modelSettings().numberOfWorkers()); - Assertions.assertEquals(StochasticOptimizer.ADAMW, model.modelSettings().optimizer()); - Assertions.assertEquals(1409212705, model.modelSettings().randomSeed()); - Assertions.assertEquals(8.159346F, model.modelSettings().stepLRGamma()); - Assertions.assertEquals(99529171, model.modelSettings().stepLRStepSize()); - Assertions.assertEquals(1768553154, model.modelSettings().trainingBatchSize()); - Assertions.assertEquals(385248466, model.modelSettings().validationBatchSize()); - Assertions.assertEquals(70.731415F, model.modelSettings().warmupCosineLRCycles()); - Assertions.assertEquals(2134877467, model.modelSettings().warmupCosineLRWarmupEpochs()); - Assertions.assertEquals(72.09128F, model.modelSettings().weightDecay()); - Assertions.assertEquals(667354640, model.modelSettings().boxDetectionsPerImage()); - Assertions.assertEquals(57.01898F, model.modelSettings().boxScoreThreshold()); - Assertions.assertEquals(920278919, model.modelSettings().imageSize()); - Assertions.assertEquals(546709544, model.modelSettings().maxSize()); - Assertions.assertEquals(1447146223, model.modelSettings().minSize()); - Assertions.assertEquals(ModelSize.LARGE, model.modelSettings().modelSize()); - Assertions.assertEquals(true, model.modelSettings().multiScale()); - Assertions.assertEquals(58.316856F, model.modelSettings().nmsIouThreshold()); - Assertions.assertEquals("sovyxpavidnievw", model.modelSettings().tileGridSize()); - Assertions.assertEquals(21.210634F, model.modelSettings().tileOverlapRatio()); - Assertions.assertEquals(54.720806F, model.modelSettings().tilePredictionsNmsThreshold()); - Assertions.assertEquals(27.970045F, model.modelSettings().validationIouThreshold()); - Assertions.assertEquals(ValidationMetricType.VOC, model.modelSettings().validationMetricType()); - Assertions.assertEquals("otgkwsxnsrqorcg", model.searchSpace().get(0).amsGradient()); - Assertions.assertEquals("mv", model.searchSpace().get(0).augmentations()); - Assertions.assertEquals("bxeetqujxcxxqn", model.searchSpace().get(0).beta1()); - Assertions.assertEquals("qjkedwqurc", model.searchSpace().get(0).beta2()); - Assertions.assertEquals("jmrvvxwjongz", model.searchSpace().get(0).distributed()); - Assertions.assertEquals("hqqrsilcch", model.searchSpace().get(0).earlyStopping()); - Assertions.assertEquals("xxkan", model.searchSpace().get(0).earlyStoppingDelay()); - Assertions.assertEquals("vri", model.searchSpace().get(0).earlyStoppingPatience()); - Assertions.assertEquals("gv", model.searchSpace().get(0).enableOnnxNormalization()); - Assertions.assertEquals("jrulfucte", model.searchSpace().get(0).evaluationFrequency()); - Assertions.assertEquals("thcfj", model.searchSpace().get(0).gradientAccumulationStep()); - Assertions.assertEquals("xlyubqjrostv", model.searchSpace().get(0).layersToFreeze()); - Assertions.assertEquals("eqmtzzbeqrz", model.searchSpace().get(0).learningRate()); - Assertions.assertEquals("x", model.searchSpace().get(0).learningRateScheduler()); - Assertions.assertEquals("xrd", model.searchSpace().get(0).modelName()); - Assertions.assertEquals("bsrwrsnrhpqat", model.searchSpace().get(0).momentum()); - Assertions.assertEquals("kkvyanxk", model.searchSpace().get(0).nesterov()); - Assertions.assertEquals("csemsvuvd", model.searchSpace().get(0).numberOfEpochs()); - Assertions.assertEquals("qxetqmmlivrjjx", model.searchSpace().get(0).numberOfWorkers()); - Assertions.assertEquals("xdchp", model.searchSpace().get(0).optimizer()); - Assertions.assertEquals("xlehzlxpgfquwzp", model.searchSpace().get(0).randomSeed()); - Assertions.assertEquals("ibelwcerwkw", model.searchSpace().get(0).stepLRGamma()); - Assertions.assertEquals("jxljtxbusq", model.searchSpace().get(0).stepLRStepSize()); - Assertions.assertEquals("xxniuisdzhgbd", model.searchSpace().get(0).trainingBatchSize()); - Assertions.assertEquals("pagsecnad", model.searchSpace().get(0).validationBatchSize()); - Assertions.assertEquals("wqrgxfllmqi", model.searchSpace().get(0).warmupCosineLRCycles()); - Assertions.assertEquals("ezoell", model.searchSpace().get(0).warmupCosineLRWarmupEpochs()); - Assertions.assertEquals("kiiwvmtu", model.searchSpace().get(0).weightDecay()); - Assertions.assertEquals("axdvwzaehp", model.searchSpace().get(0).boxDetectionsPerImage()); - Assertions.assertEquals("thd", model.searchSpace().get(0).boxScoreThreshold()); - Assertions.assertEquals("mvetatlakfq", model.searchSpace().get(0).imageSize()); - Assertions.assertEquals("xwgiks", model.searchSpace().get(0).maxSize()); - Assertions.assertEquals("vtooxrpo", model.searchSpace().get(0).minSize()); - Assertions.assertEquals("phchgjtnhtukfaci", model.searchSpace().get(0).modelSize()); - Assertions.assertEquals("bfntumeezbxvq", model.searchSpace().get(0).multiScale()); - Assertions.assertEquals("nuvwcgasgomtmjzw", model.searchSpace().get(0).nmsIouThreshold()); - Assertions.assertEquals("qgo", model.searchSpace().get(0).tileGridSize()); - Assertions.assertEquals("xpwwzt", model.searchSpace().get(0).tileOverlapRatio()); - Assertions.assertEquals("mkkhtgfredml", model.searchSpace().get(0).tilePredictionsNmsThreshold()); - Assertions.assertEquals("grllcc", model.searchSpace().get(0).validationIouThreshold()); - Assertions.assertEquals("ovjowazhpabacom", model.searchSpace().get(0).validationMetricType()); - Assertions.assertEquals(259319343, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1465106108, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT14H16M47S"), model.limitSettings().timeout()); - Assertions.assertEquals(1028451528, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1879980006, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.BAYESIAN, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("nlduwzorxsbm", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("ilrgun", model.validationData().uri()); - Assertions.assertEquals(10.09388413403216D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java deleted file mode 100644 index 1fa3bcb21577..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageSweepSettingsTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import org.junit.jupiter.api.Assertions; - -public final class ImageSweepSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageSweepSettings model = - BinaryData - .fromString( - "{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":790899458,\"evaluationInterval\":2024803970},\"samplingAlgorithm\":\"Grid\"}") - .toObject(ImageSweepSettings.class); - Assertions.assertEquals(790899458, model.earlyTermination().delayEvaluation()); - Assertions.assertEquals(2024803970, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageSweepSettings model = - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy().withDelayEvaluation(790899458).withEvaluationInterval(2024803970)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID); - model = BinaryData.fromObject(model).toObject(ImageSweepSettings.class); - Assertions.assertEquals(790899458, model.earlyTermination().delayEvaluation()); - Assertions.assertEquals(2024803970, model.earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.samplingAlgorithm()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.java deleted file mode 100644 index 1cfdd03fee4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ImageVerticalTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.EarlyTerminationPolicy; -import com.azure.resourcemanager.machinelearning.models.ImageLimitSettings; -import com.azure.resourcemanager.machinelearning.models.ImageSweepSettings; -import com.azure.resourcemanager.machinelearning.models.ImageVertical; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithmType; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ImageVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ImageVertical model = - BinaryData - .fromString( - "{\"limitSettings\":{\"maxConcurrentTrials\":4557833,\"maxTrials\":267543853,\"timeout\":\"PT33H18M38S\"},\"sweepSettings\":{\"earlyTermination\":{\"policyType\":\"EarlyTerminationPolicy\",\"delayEvaluation\":1370366721,\"evaluationInterval\":1583622668},\"samplingAlgorithm\":\"Grid\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"lbcnndt\",\"description\":\"xawqy\"},\"validationDataSize\":69.16610610373561}") - .toObject(ImageVertical.class); - Assertions.assertEquals(4557833, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(267543853, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT33H18M38S"), model.limitSettings().timeout()); - Assertions.assertEquals(1370366721, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1583622668, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("xawqy", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lbcnndt", model.validationData().uri()); - Assertions.assertEquals(69.16610610373561D, model.validationDataSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ImageVertical model = - new ImageVertical() - .withLimitSettings( - new ImageLimitSettings() - .withMaxConcurrentTrials(4557833) - .withMaxTrials(267543853) - .withTimeout(Duration.parse("PT33H18M38S"))) - .withSweepSettings( - new ImageSweepSettings() - .withEarlyTermination( - new EarlyTerminationPolicy() - .withDelayEvaluation(1370366721) - .withEvaluationInterval(1583622668)) - .withSamplingAlgorithm(SamplingAlgorithmType.GRID)) - .withValidationData( - new MLTableJobInput() - .withDescription("xawqy") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("lbcnndt")) - .withValidationDataSize(69.16610610373561D); - model = BinaryData.fromObject(model).toObject(ImageVertical.class); - Assertions.assertEquals(4557833, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(267543853, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT33H18M38S"), model.limitSettings().timeout()); - Assertions.assertEquals(1370366721, model.sweepSettings().earlyTermination().delayEvaluation()); - Assertions.assertEquals(1583622668, model.sweepSettings().earlyTermination().evaluationInterval()); - Assertions.assertEquals(SamplingAlgorithmType.GRID, model.sweepSettings().samplingAlgorithm()); - Assertions.assertEquals("xawqy", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lbcnndt", model.validationData().uri()); - Assertions.assertEquals(69.16610610373561D, model.validationDataSize()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java deleted file mode 100644 index bab5e5cf902d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InferenceContainerPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InferenceContainerProperties; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class InferenceContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InferenceContainerProperties model = - BinaryData - .fromString( - "{\"livenessRoute\":{\"path\":\"xgqddrih\",\"port\":1351999302},\"readinessRoute\":{\"path\":\"oqcaaewdaomdj\",\"port\":68062218},\"scoringRoute\":{\"path\":\"jxxkzbrmsgei\",\"port\":1985792970}}") - .toObject(InferenceContainerProperties.class); - Assertions.assertEquals("xgqddrih", model.livenessRoute().path()); - Assertions.assertEquals(1351999302, model.livenessRoute().port()); - Assertions.assertEquals("oqcaaewdaomdj", model.readinessRoute().path()); - Assertions.assertEquals(68062218, model.readinessRoute().port()); - Assertions.assertEquals("jxxkzbrmsgei", model.scoringRoute().path()); - Assertions.assertEquals(1985792970, model.scoringRoute().port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InferenceContainerProperties model = - new InferenceContainerProperties() - .withLivenessRoute(new Route().withPath("xgqddrih").withPort(1351999302)) - .withReadinessRoute(new Route().withPath("oqcaaewdaomdj").withPort(68062218)) - .withScoringRoute(new Route().withPath("jxxkzbrmsgei").withPort(1985792970)); - model = BinaryData.fromObject(model).toObject(InferenceContainerProperties.class); - Assertions.assertEquals("xgqddrih", model.livenessRoute().path()); - Assertions.assertEquals(1351999302, model.livenessRoute().port()); - Assertions.assertEquals("oqcaaewdaomdj", model.readinessRoute().path()); - Assertions.assertEquals(68062218, model.readinessRoute().port()); - Assertions.assertEquals("jxxkzbrmsgei", model.scoringRoute().path()); - Assertions.assertEquals(1985792970, model.scoringRoute().port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java deleted file mode 100644 index c367b4075c1e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaResourcesTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchemaResources model = - BinaryData - .fromString( - "{\"requests\":{\"wnwvroevytlyokr\":\"bannovvoxczytp\",\"o\":\"rouuxvnsasbcry\",\"xnazpmkml\":\"izrxklob\"},\"limits\":{\"zxlioh\":\"vfxzopjh\",\"dtfgxqbawpcbb\":\"d\",\"ofyuicd\":\"zqcyknap\",\"ybww\":\"zb\"}}") - .toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("bannovvoxczytp", model.requests().get("wnwvroevytlyokr")); - Assertions.assertEquals("vfxzopjh", model.limits().get("zxlioh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchemaResources model = - new InstanceTypeSchemaResources() - .withRequests( - mapOf("wnwvroevytlyokr", "bannovvoxczytp", "o", "rouuxvnsasbcry", "xnazpmkml", "izrxklob")) - .withLimits(mapOf("zxlioh", "vfxzopjh", "dtfgxqbawpcbb", "d", "ofyuicd", "zqcyknap", "ybww", "zb")); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchemaResources.class); - Assertions.assertEquals("bannovvoxczytp", model.requests().get("wnwvroevytlyokr")); - Assertions.assertEquals("vfxzopjh", model.limits().get("zxlioh")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java deleted file mode 100644 index efe4a50a7695..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/InstanceTypeSchemaTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class InstanceTypeSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - InstanceTypeSchema model = - BinaryData - .fromString( - "{\"nodeSelector\":{\"bo\":\"v\"},\"resources\":{\"requests\":{\"q\":\"xypokkhmi\",\"ngnbdxxew\":\"ymc\",\"qecrqctmxx\":\"ninvudbchaqdt\"},\"limits\":{\"vtzn\":\"dmflhuytx\"}}}") - .toObject(InstanceTypeSchema.class); - Assertions.assertEquals("v", model.nodeSelector().get("bo")); - Assertions.assertEquals("xypokkhmi", model.resources().requests().get("q")); - Assertions.assertEquals("dmflhuytx", model.resources().limits().get("vtzn")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - InstanceTypeSchema model = - new InstanceTypeSchema() - .withNodeSelector(mapOf("bo", "v")) - .withResources( - new InstanceTypeSchemaResources() - .withRequests(mapOf("q", "xypokkhmi", "ngnbdxxew", "ymc", "qecrqctmxx", "ninvudbchaqdt")) - .withLimits(mapOf("vtzn", "dmflhuytx"))); - model = BinaryData.fromObject(model).toObject(InstanceTypeSchema.class); - Assertions.assertEquals("v", model.nodeSelector().get("bo")); - Assertions.assertEquals("xypokkhmi", model.resources().requests().get("q")); - Assertions.assertEquals("dmflhuytx", model.resources().limits().get("vtzn")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java deleted file mode 100644 index 868c0bd7be76..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseInnerTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseInner model = - BinaryData - .fromString( - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"fvjlboxqvkjlmx\",\"computeId\":\"mdy\",\"displayName\":\"dwdigumb\",\"experimentName\":\"aauzzptjazysd\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":false,\"services\":{\"y\":{\"endpoint\":\"aiqyuvvfo\",\"errorMessage\":\"p\",\"jobServiceType\":\"qyikvy\",\"port\":1053518025,\"properties\":{},\"status\":\"vluwmncsttij\"}},\"status\":\"NotResponding\",\"description\":\"ekrsgs\",\"properties\":{\"dgkynscliqhzvhxn\":\"huzqgn\",\"tppn\":\"omtkub\",\"frbbc\":\"dxzxhi\"},\"tags\":{\"ykvgtrdcnifmz\":\"agtltdhlfkqoj\"}},\"id\":\"dymbrny\",\"name\":\"u\",\"type\":\"m\"}") - .toObject(JobBaseInner.class); - Assertions.assertEquals("ekrsgs", model.properties().description()); - Assertions.assertEquals("huzqgn", model.properties().properties().get("dgkynscliqhzvhxn")); - Assertions.assertEquals("agtltdhlfkqoj", model.properties().tags().get("ykvgtrdcnifmz")); - Assertions.assertEquals("fvjlboxqvkjlmx", model.properties().componentId()); - Assertions.assertEquals("mdy", model.properties().computeId()); - Assertions.assertEquals("dwdigumb", model.properties().displayName()); - Assertions.assertEquals("aauzzptjazysd", model.properties().experimentName()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("aiqyuvvfo", model.properties().services().get("y").endpoint()); - Assertions.assertEquals("qyikvy", model.properties().services().get("y").jobServiceType()); - Assertions.assertEquals(1053518025, model.properties().services().get("y").port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseInner model = - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("ekrsgs") - .withProperties(mapOf("dgkynscliqhzvhxn", "huzqgn", "tppn", "omtkub", "frbbc", "dxzxhi")) - .withTags(mapOf("ykvgtrdcnifmz", "agtltdhlfkqoj")) - .withComponentId("fvjlboxqvkjlmx") - .withComputeId("mdy") - .withDisplayName("dwdigumb") - .withExperimentName("aauzzptjazysd") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(false) - .withServices( - mapOf( - "y", - new JobService() - .withEndpoint("aiqyuvvfo") - .withJobServiceType("qyikvy") - .withPort(1053518025) - .withProperties(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobBaseInner.class); - Assertions.assertEquals("ekrsgs", model.properties().description()); - Assertions.assertEquals("huzqgn", model.properties().properties().get("dgkynscliqhzvhxn")); - Assertions.assertEquals("agtltdhlfkqoj", model.properties().tags().get("ykvgtrdcnifmz")); - Assertions.assertEquals("fvjlboxqvkjlmx", model.properties().componentId()); - Assertions.assertEquals("mdy", model.properties().computeId()); - Assertions.assertEquals("dwdigumb", model.properties().displayName()); - Assertions.assertEquals("aauzzptjazysd", model.properties().experimentName()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("aiqyuvvfo", model.properties().services().get("y").endpoint()); - Assertions.assertEquals("qyikvy", model.properties().services().get("y").jobServiceType()); - Assertions.assertEquals(1053518025, model.properties().services().get("y").port()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java deleted file mode 100644 index 44ccda745991..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBasePropertiesTests.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseProperties model = - BinaryData - .fromString( - "{\"jobType\":\"JobBaseProperties\",\"componentId\":\"a\",\"computeId\":\"g\",\"displayName\":\"hocxvdfffwafqrou\",\"experimentName\":\"spave\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"xdbeesmieknl\":{\"endpoint\":\"n\",\"errorMessage\":\"zudhcxg\",\"jobServiceType\":\"oyxcdyuib\",\"port\":595382657,\"properties\":{\"aeoisrvh\":\"bzydvfvfcj\",\"ukiscvwmzhw\":\"gorf\",\"nzeyqxtjj\":\"lefaxvxilcbtgn\"},\"status\":\"qlqhycavodg\"},\"cjhfgmvecactxmw\":{\"endpoint\":\"riaa\",\"errorMessage\":\"uagydwqfbylyrf\",\"jobServiceType\":\"agt\",\"port\":1621141865,\"properties\":{\"zldmozuxy\":\"qwogfnzjvus\",\"ysownbtgkbug\":\"fsbtkad\",\"pe\":\"jqctojcmisofie\",\"hihihlhzdsqtzbsr\":\"ojyqdhcuplcplcw\"},\"status\":\"o\"},\"etoge\":{\"endpoint\":\"e\",\"errorMessage\":\"wcluqovekqvgq\",\"jobServiceType\":\"wifzmp\",\"port\":1626415565,\"properties\":{\"rfsphuagrt\":\"qikfxcv\",\"xubyjaffmmfblcqc\":\"ikteusqczkvyk\",\"brta\":\"ubgq\",\"lqxihhrmooiz\":\"metttwgd\"},\"status\":\"eypxiutcxapzhyr\"}},\"status\":\"Preparing\",\"description\":\"slhvnhlab\",\"properties\":{\"hvv\":\"kkzjcjbtrga\"},\"tags\":{\"oqbeitpkxzt\":\"xjjs\",\"pimaqxzhemjyh\":\"oobklftidgfcwq\",\"bawpfajnjwltlwt\":\"hujswtwkozzwcul\",\"uktalhsnvkcdmxz\":\"j\"}}") - .toObject(JobBaseProperties.class); - Assertions.assertEquals("slhvnhlab", model.description()); - Assertions.assertEquals("kkzjcjbtrga", model.properties().get("hvv")); - Assertions.assertEquals("xjjs", model.tags().get("oqbeitpkxzt")); - Assertions.assertEquals("a", model.componentId()); - Assertions.assertEquals("g", model.computeId()); - Assertions.assertEquals("hocxvdfffwafqrou", model.displayName()); - Assertions.assertEquals("spave", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("n", model.services().get("xdbeesmieknl").endpoint()); - Assertions.assertEquals("oyxcdyuib", model.services().get("xdbeesmieknl").jobServiceType()); - Assertions.assertEquals(595382657, model.services().get("xdbeesmieknl").port()); - Assertions.assertEquals("bzydvfvfcj", model.services().get("xdbeesmieknl").properties().get("aeoisrvh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseProperties model = - new JobBaseProperties() - .withDescription("slhvnhlab") - .withProperties(mapOf("hvv", "kkzjcjbtrga")) - .withTags( - mapOf( - "oqbeitpkxzt", - "xjjs", - "pimaqxzhemjyh", - "oobklftidgfcwq", - "bawpfajnjwltlwt", - "hujswtwkozzwcul", - "uktalhsnvkcdmxz", - "j")) - .withComponentId("a") - .withComputeId("g") - .withDisplayName("hocxvdfffwafqrou") - .withExperimentName("spave") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "xdbeesmieknl", - new JobService() - .withEndpoint("n") - .withJobServiceType("oyxcdyuib") - .withPort(595382657) - .withProperties( - mapOf("aeoisrvh", "bzydvfvfcj", "ukiscvwmzhw", "gorf", "nzeyqxtjj", "lefaxvxilcbtgn")), - "cjhfgmvecactxmw", - new JobService() - .withEndpoint("riaa") - .withJobServiceType("agt") - .withPort(1621141865) - .withProperties( - mapOf( - "zldmozuxy", - "qwogfnzjvus", - "ysownbtgkbug", - "fsbtkad", - "pe", - "jqctojcmisofie", - "hihihlhzdsqtzbsr", - "ojyqdhcuplcplcw")), - "etoge", - new JobService() - .withEndpoint("e") - .withJobServiceType("wifzmp") - .withPort(1626415565) - .withProperties( - mapOf( - "rfsphuagrt", - "qikfxcv", - "xubyjaffmmfblcqc", - "ikteusqczkvyk", - "brta", - "ubgq", - "lqxihhrmooiz", - "metttwgd")))); - model = BinaryData.fromObject(model).toObject(JobBaseProperties.class); - Assertions.assertEquals("slhvnhlab", model.description()); - Assertions.assertEquals("kkzjcjbtrga", model.properties().get("hvv")); - Assertions.assertEquals("xjjs", model.tags().get("oqbeitpkxzt")); - Assertions.assertEquals("a", model.componentId()); - Assertions.assertEquals("g", model.computeId()); - Assertions.assertEquals("hocxvdfffwafqrou", model.displayName()); - Assertions.assertEquals("spave", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("n", model.services().get("xdbeesmieknl").endpoint()); - Assertions.assertEquals("oyxcdyuib", model.services().get("xdbeesmieknl").jobServiceType()); - Assertions.assertEquals(595382657, model.services().get("xdbeesmieknl").port()); - Assertions.assertEquals("bzydvfvfcj", model.services().get("xdbeesmieknl").properties().get("aeoisrvh")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java deleted file mode 100644 index dfdc7ec3e5e6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobBaseResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.JobBaseInner; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobBaseResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobBaseResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobBaseResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"zoggculapz\",\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"gogtqxepnylbf\",\"computeId\":\"jlyjtlvofq\",\"displayName\":\"vfcibyfmowux\",\"experimentName\":\"jpvd\",\"isArchived\":true,\"services\":{},\"status\":\"Queued\",\"description\":\"wzjbh\",\"properties\":{},\"tags\":{}},\"id\":\"jrkambtrnegvmnv\",\"name\":\"q\",\"type\":\"qvldspastjbkkd\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"lves\",\"computeId\":\"jlxr\",\"displayName\":\"lozapeewchpxlk\",\"experimentName\":\"kuziycsle\",\"isArchived\":true,\"services\":{},\"status\":\"Preparing\",\"description\":\"tyh\",\"properties\":{},\"tags\":{}},\"id\":\"dcgzul\",\"name\":\"mmrqz\",\"type\":\"rr\"},{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"pglydz\",\"computeId\":\"rvqeevtoepryutn\",\"displayName\":\"tpzdmovzvfvaawzq\",\"experimentName\":\"f\",\"isArchived\":false,\"services\":{},\"status\":\"Provisioning\",\"description\":\"aecxndtic\",\"properties\":{},\"tags\":{}},\"id\":\"zmlqtmldgxo\",\"name\":\"firclnpkciayz\",\"type\":\"iykhy\"}]}") - .toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("zoggculapz", model.nextLink()); - Assertions.assertEquals("wzjbh", model.value().get(0).properties().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).properties().componentId()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).properties().computeId()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).properties().displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).properties().experimentName()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobBaseResourceArmPaginatedResult model = - new JobBaseResourceArmPaginatedResult() - .withNextLink("zoggculapz") - .withValue( - Arrays - .asList( - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("wzjbh") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("gogtqxepnylbf") - .withComputeId("jlyjtlvofq") - .withDisplayName("vfcibyfmowux") - .withExperimentName("jpvd") - .withIsArchived(true) - .withServices(mapOf())), - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("tyh") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("lves") - .withComputeId("jlxr") - .withDisplayName("lozapeewchpxlk") - .withExperimentName("kuziycsle") - .withIsArchived(true) - .withServices(mapOf())), - new JobBaseInner() - .withProperties( - new JobBaseProperties() - .withDescription("aecxndtic") - .withProperties(mapOf()) - .withTags(mapOf()) - .withComponentId("pglydz") - .withComputeId("rvqeevtoepryutn") - .withDisplayName("tpzdmovzvfvaawzq") - .withExperimentName("f") - .withIsArchived(false) - .withServices(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobBaseResourceArmPaginatedResult.class); - Assertions.assertEquals("zoggculapz", model.nextLink()); - Assertions.assertEquals("wzjbh", model.value().get(0).properties().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).properties().componentId()); - Assertions.assertEquals("jlyjtlvofq", model.value().get(0).properties().computeId()); - Assertions.assertEquals("vfcibyfmowux", model.value().get(0).properties().displayName()); - Assertions.assertEquals("jpvd", model.value().get(0).properties().experimentName()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java deleted file mode 100644 index c2332d6a9fe1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobInputTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import org.junit.jupiter.api.Assertions; - -public final class JobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobInput model = - BinaryData.fromString("{\"jobInputType\":\"JobInput\",\"description\":\"pjby\"}").toObject(JobInput.class); - Assertions.assertEquals("pjby", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobInput model = new JobInput().withDescription("pjby"); - model = BinaryData.fromObject(model).toObject(JobInput.class); - Assertions.assertEquals("pjby", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java deleted file mode 100644 index b656997bc9fa..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobLimitsTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class JobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobLimits model = - BinaryData - .fromString("{\"jobLimitsType\":\"JobLimits\",\"timeout\":\"PT90H18M40S\"}") - .toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H18M40S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobLimits model = new JobLimits().withTimeout(Duration.parse("PT90H18M40S")); - model = BinaryData.fromObject(model).toObject(JobLimits.class); - Assertions.assertEquals(Duration.parse("PT90H18M40S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java deleted file mode 100644 index 26db9eb1fe84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobOutputTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import org.junit.jupiter.api.Assertions; - -public final class JobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobOutput model = - BinaryData - .fromString("{\"jobOutputType\":\"JobOutput\",\"description\":\"qmbzmq\"}") - .toObject(JobOutput.class); - Assertions.assertEquals("qmbzmq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobOutput model = new JobOutput().withDescription("qmbzmq"); - model = BinaryData.fromObject(model).toObject(JobOutput.class); - Assertions.assertEquals("qmbzmq", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java deleted file mode 100644 index 016031d68319..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobResourceConfigurationTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobResourceConfiguration model = - BinaryData - .fromString( - "{\"dockerArgs\":\"atbnxwbj\",\"shmSize\":\"dbirkfpksokdgo\",\"instanceCount\":1548314621,\"instanceType\":\"jymrhbg\",\"properties\":{\"nfnzhhh\":\"datazkye\",\"mffjkutycyarn\":\"datao\",\"pyc\":\"dataoohguabzoghkt\"}}") - .toObject(JobResourceConfiguration.class); - Assertions.assertEquals(1548314621, model.instanceCount()); - Assertions.assertEquals("jymrhbg", model.instanceType()); - Assertions.assertEquals("atbnxwbj", model.dockerArgs()); - Assertions.assertEquals("dbirkfpksokdgo", model.shmSize()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobResourceConfiguration model = - new JobResourceConfiguration() - .withInstanceCount(1548314621) - .withInstanceType("jymrhbg") - .withProperties(mapOf("nfnzhhh", "datazkye", "mffjkutycyarn", "datao", "pyc", "dataoohguabzoghkt")) - .withDockerArgs("atbnxwbj") - .withShmSize("dbirkfpksokdgo"); - model = BinaryData.fromObject(model).toObject(JobResourceConfiguration.class); - Assertions.assertEquals(1548314621, model.instanceCount()); - Assertions.assertEquals("jymrhbg", model.instanceType()); - Assertions.assertEquals("atbnxwbj", model.dockerArgs()); - Assertions.assertEquals("dbirkfpksokdgo", model.shmSize()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java deleted file mode 100644 index 169695892b2c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobScheduleActionTests.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import com.azure.resourcemanager.machinelearning.models.JobScheduleAction; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobScheduleActionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobScheduleAction model = - BinaryData - .fromString( - "{\"actionType\":\"CreateJob\",\"jobDefinition\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"xkydfbwlja\",\"computeId\":\"uerkjddvrg\",\"displayName\":\"egftcvb\",\"experimentName\":\"ftksd\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"jgmn\":{\"endpoint\":\"gmwdh\",\"errorMessage\":\"buvczldbglzoutb\",\"jobServiceType\":\"qgz\",\"port\":1543957529,\"properties\":{},\"status\":\"lyzgsnor\"},\"rswhbuubpyro\":{\"endpoint\":\"otvmrxk\",\"errorMessage\":\"obvvjbhvh\",\"jobServiceType\":\"qayfl\",\"port\":307514340,\"properties\":{},\"status\":\"snuudtelvhyibdr\"},\"km\":{\"endpoint\":\"joxztfwfqchvczev\",\"errorMessage\":\"nctagfyvrtpqpem\",\"jobServiceType\":\"cgkrepdqhqy\",\"port\":1873371469,\"properties\":{},\"status\":\"mvxqab\"}},\"status\":\"NotStarted\",\"description\":\"inhgre\",\"properties\":{\"angp\":\"whlpuzjpceezn\",\"phmsexroq\":\"bfaxyxzlbc\",\"nfee\":\"ndktxfv\"},\"tags\":{\"bgnixxoww\":\"krie\",\"p\":\"kyfwnwpiwxeiicr\",\"dm\":\"pk\"}}}") - .toObject(JobScheduleAction.class); - Assertions.assertEquals("inhgre", model.jobDefinition().description()); - Assertions.assertEquals("whlpuzjpceezn", model.jobDefinition().properties().get("angp")); - Assertions.assertEquals("krie", model.jobDefinition().tags().get("bgnixxoww")); - Assertions.assertEquals("xkydfbwlja", model.jobDefinition().componentId()); - Assertions.assertEquals("uerkjddvrg", model.jobDefinition().computeId()); - Assertions.assertEquals("egftcvb", model.jobDefinition().displayName()); - Assertions.assertEquals("ftksd", model.jobDefinition().experimentName()); - Assertions.assertEquals(true, model.jobDefinition().isArchived()); - Assertions.assertEquals("gmwdh", model.jobDefinition().services().get("jgmn").endpoint()); - Assertions.assertEquals("qgz", model.jobDefinition().services().get("jgmn").jobServiceType()); - Assertions.assertEquals(1543957529, model.jobDefinition().services().get("jgmn").port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobScheduleAction model = - new JobScheduleAction() - .withJobDefinition( - new JobBaseProperties() - .withDescription("inhgre") - .withProperties(mapOf("angp", "whlpuzjpceezn", "phmsexroq", "bfaxyxzlbc", "nfee", "ndktxfv")) - .withTags(mapOf("bgnixxoww", "krie", "p", "kyfwnwpiwxeiicr", "dm", "pk")) - .withComponentId("xkydfbwlja") - .withComputeId("uerkjddvrg") - .withDisplayName("egftcvb") - .withExperimentName("ftksd") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "jgmn", - new JobService() - .withEndpoint("gmwdh") - .withJobServiceType("qgz") - .withPort(1543957529) - .withProperties(mapOf()), - "rswhbuubpyro", - new JobService() - .withEndpoint("otvmrxk") - .withJobServiceType("qayfl") - .withPort(307514340) - .withProperties(mapOf()), - "km", - new JobService() - .withEndpoint("joxztfwfqchvczev") - .withJobServiceType("cgkrepdqhqy") - .withPort(1873371469) - .withProperties(mapOf())))); - model = BinaryData.fromObject(model).toObject(JobScheduleAction.class); - Assertions.assertEquals("inhgre", model.jobDefinition().description()); - Assertions.assertEquals("whlpuzjpceezn", model.jobDefinition().properties().get("angp")); - Assertions.assertEquals("krie", model.jobDefinition().tags().get("bgnixxoww")); - Assertions.assertEquals("xkydfbwlja", model.jobDefinition().componentId()); - Assertions.assertEquals("uerkjddvrg", model.jobDefinition().computeId()); - Assertions.assertEquals("egftcvb", model.jobDefinition().displayName()); - Assertions.assertEquals("ftksd", model.jobDefinition().experimentName()); - Assertions.assertEquals(true, model.jobDefinition().isArchived()); - Assertions.assertEquals("gmwdh", model.jobDefinition().services().get("jgmn").endpoint()); - Assertions.assertEquals("qgz", model.jobDefinition().services().get("jgmn").jobServiceType()); - Assertions.assertEquals(1543957529, model.jobDefinition().services().get("jgmn").port()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java deleted file mode 100644 index f6f30fc8c618..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobServiceTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.JobService; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class JobServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobService model = - BinaryData - .fromString( - "{\"endpoint\":\"oaimlnw\",\"errorMessage\":\"aomylwea\",\"jobServiceType\":\"lcsethwwnpj\",\"port\":307378678,\"properties\":{\"ousnfepgfewe\":\"wpchwahf\",\"hdjhlimmbcx\":\"wlyxgncxyk\",\"cporxvxcjz\":\"h\",\"juhdqazkmtgguwpi\":\"qizxfpxtgqscjavf\"},\"status\":\"ajc\"}") - .toObject(JobService.class); - Assertions.assertEquals("oaimlnw", model.endpoint()); - Assertions.assertEquals("lcsethwwnpj", model.jobServiceType()); - Assertions.assertEquals(307378678, model.port()); - Assertions.assertEquals("wpchwahf", model.properties().get("ousnfepgfewe")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobService model = - new JobService() - .withEndpoint("oaimlnw") - .withJobServiceType("lcsethwwnpj") - .withPort(307378678) - .withProperties( - mapOf( - "ousnfepgfewe", - "wpchwahf", - "hdjhlimmbcx", - "wlyxgncxyk", - "cporxvxcjz", - "h", - "juhdqazkmtgguwpi", - "qizxfpxtgqscjavf")); - model = BinaryData.fromObject(model).toObject(JobService.class); - Assertions.assertEquals("oaimlnw", model.endpoint()); - Assertions.assertEquals("lcsethwwnpj", model.jobServiceType()); - Assertions.assertEquals(307378678, model.port()); - Assertions.assertEquals("wpchwahf", model.properties().get("ousnfepgfewe")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java deleted file mode 100644 index 23838cb4b5c8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCancelMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsCancelMockTests { - @Test - public void testCancel() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().cancel("bdxmd", "esbrujbjpppktl", "dibfmthi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index cf71fac576b0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsCreateOrUpdateWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.JobBaseProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"qmrpahuuonjk\",\"computeId\":\"ukguehvvp\",\"displayName\":\"oegcjoj\",\"experimentName\":\"eui\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Preparing\",\"description\":\"nhtmeplhbp\",\"properties\":{\"uc\":\"pmummmkva\",\"chxwwuzdmh\":\"jiuaiqpmnufzh\"},\"tags\":{\"mlitqdsj\":\"vivjm\",\"efndslvrqoemwsi\":\"pdviscotyxbrii\"}},\"id\":\"ailwdqmqfyd\",\"name\":\"otmfxlkdlgwgna\",\"type\":\"kuuyiuyuaf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = - manager - .jobs() - .define("zqpl") - .withExistingWorkspace("at", "ejrnmi") - .withProperties( - new JobBaseProperties() - .withDescription("xxkwykuqdndx") - .withProperties(mapOf("gga", "h")) - .withTags(mapOf("eerscdxrnrnjrcu", "gtf", "acnrgfdtncmspsan", "mb", "b", "ame")) - .withComponentId("kihonik") - .withComputeId("r") - .withDisplayName("ffjilzfbpnt") - .withExperimentName("kensckh") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(false) - .withServices(mapOf())) - .create(); - - Assertions.assertEquals("nhtmeplhbp", response.properties().description()); - Assertions.assertEquals("pmummmkva", response.properties().properties().get("uc")); - Assertions.assertEquals("vivjm", response.properties().tags().get("mlitqdsj")); - Assertions.assertEquals("qmrpahuuonjk", response.properties().componentId()); - Assertions.assertEquals("ukguehvvp", response.properties().computeId()); - Assertions.assertEquals("oegcjoj", response.properties().displayName()); - Assertions.assertEquals("eui", response.properties().experimentName()); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java deleted file mode 100644 index 58d8aeb6fb18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("fvbennmfkbpjnr", "ekwwnthropmdudsy", "urz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java deleted file mode 100644 index 99d19faeb69b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"yedzfzq\",\"computeId\":\"uqhtdereuno\",\"displayName\":\"kzwhpj\",\"experimentName\":\"yxedznmx\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Queued\",\"description\":\"my\",\"properties\":{\"jjtpdyzoutxfptof\":\"px\",\"gaaqw\":\"gnuywezygva\",\"lufbortb\":\"kgjpytpmpvdnoge\"},\"tags\":{\"axzs\":\"k\"}},\"id\":\"xxyjisskobqoclfl\",\"name\":\"oewyhxessmvrkd\",\"type\":\"sqeq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobBase response = - manager - .jobs() - .getWithResponse("vktjhffecqkoq", "ouergaghp", "zxkpyehhfdyld", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("my", response.properties().description()); - Assertions.assertEquals("px", response.properties().properties().get("jjtpdyzoutxfptof")); - Assertions.assertEquals("k", response.properties().tags().get("axzs")); - Assertions.assertEquals("yedzfzq", response.properties().componentId()); - Assertions.assertEquals("uqhtdereuno", response.properties().computeId()); - Assertions.assertEquals("kzwhpj", response.properties().displayName()); - Assertions.assertEquals("yxedznmx", response.properties().experimentName()); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java deleted file mode 100644 index ae721a98aa71..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/JobsListMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.JobBase; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"jobType\":\"JobBaseProperties\",\"componentId\":\"tvzjyi\",\"computeId\":\"bqrvvbqv\",\"displayName\":\"mpe\",\"experimentName\":\"xgiqasifubn\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{},\"status\":\"Completed\",\"description\":\"jnxjkht\",\"properties\":{\"xfwkz\":\"vyouweui\",\"kqytkztadopgfzdg\":\"smsfbevyllznf\"},\"tags\":{\"svloyyhigq\":\"yc\"}},\"id\":\"juqwqajq\",\"name\":\"zxpixhyo\",\"type\":\"pnfdbgsosciene\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .jobs() - .list( - "hrbkhtmqowi", - "asfgqgucyhfaimqv", - "ruozkgyfp", - "oehgfmqmskkixvlz", - "xplhpeva", - ListViewType.ALL, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("jnxjkht", response.iterator().next().properties().description()); - Assertions.assertEquals("vyouweui", response.iterator().next().properties().properties().get("xfwkz")); - Assertions.assertEquals("yc", response.iterator().next().properties().tags().get("svloyyhigq")); - Assertions.assertEquals("tvzjyi", response.iterator().next().properties().componentId()); - Assertions.assertEquals("bqrvvbqv", response.iterator().next().properties().computeId()); - Assertions.assertEquals("mpe", response.iterator().next().properties().displayName()); - Assertions.assertEquals("xgiqasifubn", response.iterator().next().properties().experimentName()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java deleted file mode 100644 index 8bfd89ba8ca1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesPropertiesTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchemaResources; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesProperties model = - BinaryData - .fromString( - "{\"relayConnectionString\":\"oyuelyetn\",\"serviceBusConnectionString\":\"bf\",\"extensionPrincipalId\":\"ggagfln\",\"extensionInstanceReleaseTrain\":\"mtrwah\",\"vcName\":\"mu\",\"namespace\":\"tb\",\"defaultInstanceType\":\"plrohkpigq\",\"instanceTypes\":{\"nmg\":{\"nodeSelector\":{\"alhhjnhgwydyynfs\":\"kzmkwklsnoxaxmqe\",\"qtanarfdlpuk\":\"khgb\",\"neizjcpe\":\"py\"},\"resources\":{\"requests\":{},\"limits\":{}}},\"f\":{\"nodeSelector\":{\"fpazjzoywjxhpd\":\"uxddbhfh\",\"tehtuevrhrljyoog\":\"lontacnpq\",\"sd\":\"xh\",\"arenlvhhtklnvnaf\":\"ugwbsreurfqkf\"},\"resources\":{\"requests\":{},\"limits\":{}}}}}") - .toObject(KubernetesProperties.class); - Assertions.assertEquals("oyuelyetn", model.relayConnectionString()); - Assertions.assertEquals("bf", model.serviceBusConnectionString()); - Assertions.assertEquals("ggagfln", model.extensionPrincipalId()); - Assertions.assertEquals("mtrwah", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("mu", model.vcName()); - Assertions.assertEquals("tb", model.namespace()); - Assertions.assertEquals("plrohkpigq", model.defaultInstanceType()); - Assertions - .assertEquals("kzmkwklsnoxaxmqe", model.instanceTypes().get("nmg").nodeSelector().get("alhhjnhgwydyynfs")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesProperties model = - new KubernetesProperties() - .withRelayConnectionString("oyuelyetn") - .withServiceBusConnectionString("bf") - .withExtensionPrincipalId("ggagfln") - .withExtensionInstanceReleaseTrain("mtrwah") - .withVcName("mu") - .withNamespace("tb") - .withDefaultInstanceType("plrohkpigq") - .withInstanceTypes( - mapOf( - "nmg", - new InstanceTypeSchema() - .withNodeSelector( - mapOf("alhhjnhgwydyynfs", "kzmkwklsnoxaxmqe", "qtanarfdlpuk", "khgb", "neizjcpe", "py")) - .withResources(new InstanceTypeSchemaResources().withRequests(mapOf()).withLimits(mapOf())), - "f", - new InstanceTypeSchema() - .withNodeSelector( - mapOf( - "fpazjzoywjxhpd", - "uxddbhfh", - "tehtuevrhrljyoog", - "lontacnpq", - "sd", - "xh", - "arenlvhhtklnvnaf", - "ugwbsreurfqkf")) - .withResources( - new InstanceTypeSchemaResources().withRequests(mapOf()).withLimits(mapOf())))); - model = BinaryData.fromObject(model).toObject(KubernetesProperties.class); - Assertions.assertEquals("oyuelyetn", model.relayConnectionString()); - Assertions.assertEquals("bf", model.serviceBusConnectionString()); - Assertions.assertEquals("ggagfln", model.extensionPrincipalId()); - Assertions.assertEquals("mtrwah", model.extensionInstanceReleaseTrain()); - Assertions.assertEquals("mu", model.vcName()); - Assertions.assertEquals("tb", model.namespace()); - Assertions.assertEquals("plrohkpigq", model.defaultInstanceType()); - Assertions - .assertEquals("kzmkwklsnoxaxmqe", model.instanceTypes().get("nmg").nodeSelector().get("alhhjnhgwydyynfs")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java deleted file mode 100644 index 453e44acde53..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesSchemaTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import com.azure.resourcemanager.machinelearning.models.KubernetesSchema; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesSchemaTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KubernetesSchema model = - BinaryData - .fromString( - "{\"properties\":{\"relayConnectionString\":\"j\",\"serviceBusConnectionString\":\"nuygbqeqqekewvnq\",\"extensionPrincipalId\":\"dlguaucmfdjwn\",\"extensionInstanceReleaseTrain\":\"xpunjqi\",\"vcName\":\"zvvitacgxmfcs\",\"namespace\":\"rxhtvso\",\"defaultInstanceType\":\"lwntsjgqrs\",\"instanceTypes\":{\"uuybnchrsz\":{\"nodeSelector\":{}}}}}") - .toObject(KubernetesSchema.class); - Assertions.assertEquals("j", model.properties().relayConnectionString()); - Assertions.assertEquals("nuygbqeqqekewvnq", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("dlguaucmfdjwn", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xpunjqi", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("zvvitacgxmfcs", model.properties().vcName()); - Assertions.assertEquals("rxhtvso", model.properties().namespace()); - Assertions.assertEquals("lwntsjgqrs", model.properties().defaultInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KubernetesSchema model = - new KubernetesSchema() - .withProperties( - new KubernetesProperties() - .withRelayConnectionString("j") - .withServiceBusConnectionString("nuygbqeqqekewvnq") - .withExtensionPrincipalId("dlguaucmfdjwn") - .withExtensionInstanceReleaseTrain("xpunjqi") - .withVcName("zvvitacgxmfcs") - .withNamespace("rxhtvso") - .withDefaultInstanceType("lwntsjgqrs") - .withInstanceTypes(mapOf("uuybnchrsz", new InstanceTypeSchema().withNodeSelector(mapOf())))); - model = BinaryData.fromObject(model).toObject(KubernetesSchema.class); - Assertions.assertEquals("j", model.properties().relayConnectionString()); - Assertions.assertEquals("nuygbqeqqekewvnq", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("dlguaucmfdjwn", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xpunjqi", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("zvvitacgxmfcs", model.properties().vcName()); - Assertions.assertEquals("rxhtvso", model.properties().namespace()); - Assertions.assertEquals("lwntsjgqrs", model.properties().defaultInstanceType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java deleted file mode 100644 index 57777282d303..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/KubernetesTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InstanceTypeSchema; -import com.azure.resourcemanager.machinelearning.models.Kubernetes; -import com.azure.resourcemanager.machinelearning.models.KubernetesProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KubernetesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Kubernetes model = - BinaryData - .fromString( - "{\"computeType\":\"Kubernetes\",\"properties\":{\"relayConnectionString\":\"nfxofvcj\",\"serviceBusConnectionString\":\"dirazf\",\"extensionPrincipalId\":\"ejwabmdujtmvco\",\"extensionInstanceReleaseTrain\":\"xcmjurbu\",\"vcName\":\"lkyqltqsrog\",\"namespace\":\"wkffdjkt\",\"defaultInstanceType\":\"sidfv\",\"instanceTypes\":{\"n\":{\"nodeSelector\":{}}}},\"computeLocation\":\"ijtk\",\"provisioningState\":\"Succeeded\",\"description\":\"ogsf\",\"createdOn\":\"2021-05-31T19:57:24Z\",\"modifiedOn\":\"2021-02-04T08:33:30Z\",\"resourceId\":\"nsharujtjiqxfzyj\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":true}") - .toObject(Kubernetes.class); - Assertions.assertEquals("ijtk", model.computeLocation()); - Assertions.assertEquals("ogsf", model.description()); - Assertions.assertEquals("nsharujtjiqxfzyj", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("nfxofvcj", model.properties().relayConnectionString()); - Assertions.assertEquals("dirazf", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("ejwabmdujtmvco", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xcmjurbu", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("lkyqltqsrog", model.properties().vcName()); - Assertions.assertEquals("wkffdjkt", model.properties().namespace()); - Assertions.assertEquals("sidfv", model.properties().defaultInstanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Kubernetes model = - new Kubernetes() - .withComputeLocation("ijtk") - .withDescription("ogsf") - .withResourceId("nsharujtjiqxfzyj") - .withDisableLocalAuth(true) - .withProperties( - new KubernetesProperties() - .withRelayConnectionString("nfxofvcj") - .withServiceBusConnectionString("dirazf") - .withExtensionPrincipalId("ejwabmdujtmvco") - .withExtensionInstanceReleaseTrain("xcmjurbu") - .withVcName("lkyqltqsrog") - .withNamespace("wkffdjkt") - .withDefaultInstanceType("sidfv") - .withInstanceTypes(mapOf("n", new InstanceTypeSchema().withNodeSelector(mapOf())))); - model = BinaryData.fromObject(model).toObject(Kubernetes.class); - Assertions.assertEquals("ijtk", model.computeLocation()); - Assertions.assertEquals("ogsf", model.description()); - Assertions.assertEquals("nsharujtjiqxfzyj", model.resourceId()); - Assertions.assertEquals(true, model.disableLocalAuth()); - Assertions.assertEquals("nfxofvcj", model.properties().relayConnectionString()); - Assertions.assertEquals("dirazf", model.properties().serviceBusConnectionString()); - Assertions.assertEquals("ejwabmdujtmvco", model.properties().extensionPrincipalId()); - Assertions.assertEquals("xcmjurbu", model.properties().extensionInstanceReleaseTrain()); - Assertions.assertEquals("lkyqltqsrog", model.properties().vcName()); - Assertions.assertEquals("wkffdjkt", model.properties().namespace()); - Assertions.assertEquals("sidfv", model.properties().defaultInstanceType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java deleted file mode 100644 index ba013607d7ff..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListAmlUserFeatureResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListAmlUserFeatureResult; - -public final class ListAmlUserFeatureResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListAmlUserFeatureResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"cvclxynpdk\",\"displayName\":\"fabuiyjibu\",\"description\":\"hdugneiknpg\"},{\"id\":\"gjiuqhibto\",\"displayName\":\"pqwjedm\",\"description\":\"r\"}],\"nextLink\":\"g\"}") - .toObject(ListAmlUserFeatureResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListAmlUserFeatureResult model = new ListAmlUserFeatureResult(); - model = BinaryData.fromObject(model).toObject(ListAmlUserFeatureResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java deleted file mode 100644 index cac57a027187..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListUsagesResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListUsagesResult; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"rvqdra\",\"amlWorkspaceLocation\":\"jybige\",\"type\":\"qfbow\",\"unit\":\"Count\",\"currentValue\":4187351799054769848,\"limit\":8321881464692032483,\"name\":{\"value\":\"iywgqywgndrvynh\",\"localizedValue\":\"pphrcgynco\"}},{\"id\":\"ecfvmm\",\"amlWorkspaceLocation\":\"ofsx\",\"type\":\"evgbmqjq\",\"unit\":\"Count\",\"currentValue\":596965066352142059,\"limit\":4744542296757351266,\"name\":{\"value\":\"zuvccfwnfnbacfio\",\"localizedValue\":\"ebxetqgtzxdp\"}}],\"nextLink\":\"bqqwxrj\"}") - .toObject(ListUsagesResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult(); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java deleted file mode 100644 index b8f8b806a173..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ListWorkspaceQuotasTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ListWorkspaceQuotas; - -public final class ListWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListWorkspaceQuotas model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"gidyjrrf\",\"amlWorkspaceLocation\":\"aos\",\"type\":\"xc\",\"name\":{\"value\":\"pclhocohslk\",\"localizedValue\":\"leggzfbu\"},\"limit\":5326513191162029025,\"unit\":\"Count\"},{\"id\":\"k\",\"amlWorkspaceLocation\":\"eiithlvmez\",\"type\":\"shxmzsbbzoggigrx\",\"name\":{\"value\":\"rvjx\",\"localizedValue\":\"nspydptkoenkoukn\"},\"limit\":5351704758336650999,\"unit\":\"Count\"},{\"id\":\"kbldngkpocipa\",\"amlWorkspaceLocation\":\"xoegukgjnpiucgy\",\"type\":\"vqzntypmrbpizcdr\",\"name\":{\"value\":\"dpydn\",\"localizedValue\":\"hxdeoejz\"},\"limit\":731748747615090484,\"unit\":\"Count\"}],\"nextLink\":\"ttgzfbis\"}") - .toObject(ListWorkspaceQuotas.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListWorkspaceQuotas model = new ListWorkspaceQuotas(); - model = BinaryData.fromObject(model).toObject(ListWorkspaceQuotas.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java deleted file mode 100644 index f129857a63a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/LiteralJobInputTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.LiteralJobInput; -import org.junit.jupiter.api.Assertions; - -public final class LiteralJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LiteralJobInput model = - BinaryData - .fromString("{\"jobInputType\":\"literal\",\"value\":\"mabeddqilwgdf\",\"description\":\"qfp\"}") - .toObject(LiteralJobInput.class); - Assertions.assertEquals("qfp", model.description()); - Assertions.assertEquals("mabeddqilwgdf", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LiteralJobInput model = new LiteralJobInput().withDescription("qfp").withValue("mabeddqilwgdf"); - model = BinaryData.fromObject(model).toObject(LiteralJobInput.class); - Assertions.assertEquals("qfp", model.description()); - Assertions.assertEquals("mabeddqilwgdf", model.value()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java deleted file mode 100644 index 3ea54481c38d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobInputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"mlflow_model\",\"mode\":\"Direct\",\"uri\":\"vdmvxadqa\",\"description\":\"rgnawbabgfbk\"}") - .toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("rgnawbabgfbk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("vdmvxadqa", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobInput model = - new MLFlowModelJobInput() - .withDescription("rgnawbabgfbk") - .withMode(InputDeliveryMode.DIRECT) - .withUri("vdmvxadqa"); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobInput.class); - Assertions.assertEquals("rgnawbabgfbk", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("vdmvxadqa", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java deleted file mode 100644 index f145c68c4297..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLFlowModelJobOutputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLFlowModelJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLFlowModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLFlowModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"mlflow_model\",\"mode\":\"Upload\",\"uri\":\"twmlmhjnqtqeah\",\"description\":\"dvragpokddxejhh\"}") - .toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dvragpokddxejhh", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("twmlmhjnqtqeah", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLFlowModelJobOutput model = - new MLFlowModelJobOutput() - .withDescription("dvragpokddxejhh") - .withMode(OutputDeliveryMode.UPLOAD) - .withUri("twmlmhjnqtqeah"); - model = BinaryData.fromObject(model).toObject(MLFlowModelJobOutput.class); - Assertions.assertEquals("dvragpokddxejhh", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("twmlmhjnqtqeah", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.java deleted file mode 100644 index d878fc90c216..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableDataTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableData; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class MLTableDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableData model = - BinaryData - .fromString( - "{\"dataType\":\"mltable\",\"referencedUris\":[\"uavt\",\"tbkewkqynspg\"],\"dataUri\":\"voffbkkwvdxae\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"rlj\",\"properties\":{\"lpbcjtrpz\":\"zbnobr\",\"qelwgdhuruzytza\":\"yudivbxnhsqeaeo\",\"mpinmzvfkneerzzt\":\"ogatmoljiy\",\"bnhrxlelfjhkeiz\":\"knsjulugd\"},\"tags\":{\"wjekptycaydbj\":\"htdm\"}}") - .toObject(MLTableData.class); - Assertions.assertEquals("rlj", model.description()); - Assertions.assertEquals("zbnobr", model.properties().get("lpbcjtrpz")); - Assertions.assertEquals("htdm", model.tags().get("wjekptycaydbj")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("voffbkkwvdxae", model.dataUri()); - Assertions.assertEquals("uavt", model.referencedUris().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableData model = - new MLTableData() - .withDescription("rlj") - .withProperties( - mapOf( - "lpbcjtrpz", - "zbnobr", - "qelwgdhuruzytza", - "yudivbxnhsqeaeo", - "mpinmzvfkneerzzt", - "ogatmoljiy", - "bnhrxlelfjhkeiz", - "knsjulugd")) - .withTags(mapOf("wjekptycaydbj", "htdm")) - .withIsAnonymous(false) - .withIsArchived(false) - .withDataUri("voffbkkwvdxae") - .withReferencedUris(Arrays.asList("uavt", "tbkewkqynspg")); - model = BinaryData.fromObject(model).toObject(MLTableData.class); - Assertions.assertEquals("rlj", model.description()); - Assertions.assertEquals("zbnobr", model.properties().get("lpbcjtrpz")); - Assertions.assertEquals("htdm", model.tags().get("wjekptycaydbj")); - Assertions.assertEquals(false, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("voffbkkwvdxae", model.dataUri()); - Assertions.assertEquals("uavt", model.referencedUris().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java deleted file mode 100644 index b3dc0b4dc534..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobInputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"pqinf\",\"description\":\"pyglqdhmrjzral\"}") - .toObject(MLTableJobInput.class); - Assertions.assertEquals("pyglqdhmrjzral", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("pqinf", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobInput model = - new MLTableJobInput().withDescription("pyglqdhmrjzral").withMode(InputDeliveryMode.DIRECT).withUri("pqinf"); - model = BinaryData.fromObject(model).toObject(MLTableJobInput.class); - Assertions.assertEquals("pyglqdhmrjzral", model.description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode()); - Assertions.assertEquals("pqinf", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java deleted file mode 100644 index 5c66587aba52..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MLTableJobOutputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MLTableJobOutput; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import org.junit.jupiter.api.Assertions; - -public final class MLTableJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MLTableJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"mlcfnzhmhsurl\",\"description\":\"qkpmmzpstau\"}") - .toObject(MLTableJobOutput.class); - Assertions.assertEquals("qkpmmzpstau", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("mlcfnzhmhsurl", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MLTableJobOutput model = - new MLTableJobOutput() - .withDescription("qkpmmzpstau") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("mlcfnzhmhsurl"); - model = BinaryData.fromObject(model).toObject(MLTableJobOutput.class); - Assertions.assertEquals("qkpmmzpstau", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("mlcfnzhmhsurl", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java deleted file mode 100644 index cd00ea9d950c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedIdentityTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedIdentity; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentity model = - BinaryData - .fromString( - "{\"identityType\":\"Managed\",\"clientId\":\"49930aac-491a-4ce3-99bb-f763f6db3ac3\",\"objectId\":\"2fd57264-6306-4a7e-bd5d-0d45048516e5\",\"resourceId\":\"clg\"}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3"), model.clientId()); - Assertions.assertEquals(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5"), model.objectId()); - Assertions.assertEquals("clg", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model = - new ManagedIdentity() - .withClientId(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3")) - .withObjectId(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5")) - .withResourceId("clg"); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(UUID.fromString("49930aac-491a-4ce3-99bb-f763f6db3ac3"), model.clientId()); - Assertions.assertEquals(UUID.fromString("2fd57264-6306-4a7e-bd5d-0d45048516e5"), model.objectId()); - Assertions.assertEquals("clg", model.resourceId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 1109f7fc49d4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"eedebc97-7cf9-49d6-8058-af89513b30b7\",\"tenantId\":\"022e8374-0d41-4bc5-8365-0eb3372a635f\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ginuvamih\":{\"principalId\":\"f6324d70-bc8b-4552-95e1-03d0c14617f7\",\"clientId\":\"334d5ff8-4410-4858-b84d-54862312e602\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("ginuvamih", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java deleted file mode 100644 index 36f27a2eb5f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MedianStoppingPolicyTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.MedianStoppingPolicy; -import org.junit.jupiter.api.Assertions; - -public final class MedianStoppingPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MedianStoppingPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"MedianStopping\",\"delayEvaluation\":2026820948,\"evaluationInterval\":660103653}") - .toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(2026820948, model.delayEvaluation()); - Assertions.assertEquals(660103653, model.evaluationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MedianStoppingPolicy model = - new MedianStoppingPolicy().withDelayEvaluation(2026820948).withEvaluationInterval(660103653); - model = BinaryData.fromObject(model).toObject(MedianStoppingPolicy.class); - Assertions.assertEquals(2026820948, model.delayEvaluation()); - Assertions.assertEquals(660103653, model.evaluationInterval()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.java deleted file mode 100644 index b1dce75cdfb4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerInner model = - BinaryData - .fromString( - "{\"properties\":{\"isArchived\":false,\"latestVersion\":\"gaqvlgafcqusrd\",\"nextVersion\":\"t\",\"description\":\"sdtutnwlduyc\",\"properties\":{\"kuqgsjjxundxgket\":\"hyrmewipmvekdx\",\"gpmuneqsxvmhfbuz\":\"zhhzjhfjmhvvmu\",\"ms\":\"yihsasbhudypohyu\"},\"tags\":{\"pfoobr\":\"sqy\",\"qdnfwqzdz\":\"ttymsjny\",\"fhqlyvi\":\"tilaxh\",\"ti\":\"ouwivkxoyzunbixx\"}},\"id\":\"cpwpg\",\"name\":\"lrcivtsoxfrke\",\"type\":\"xpmyyefrpmpdnq\"}") - .toObject(ModelContainerInner.class); - Assertions.assertEquals("sdtutnwlduyc", model.properties().description()); - Assertions.assertEquals("hyrmewipmvekdx", model.properties().properties().get("kuqgsjjxundxgket")); - Assertions.assertEquals("sqy", model.properties().tags().get("pfoobr")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerInner model = - new ModelContainerInner() - .withProperties( - new ModelContainerProperties() - .withDescription("sdtutnwlduyc") - .withProperties( - mapOf( - "kuqgsjjxundxgket", - "hyrmewipmvekdx", - "gpmuneqsxvmhfbuz", - "zhhzjhfjmhvvmu", - "ms", - "yihsasbhudypohyu")) - .withTags( - mapOf( - "pfoobr", - "sqy", - "qdnfwqzdz", - "ttymsjny", - "fhqlyvi", - "tilaxh", - "ti", - "ouwivkxoyzunbixx")) - .withIsArchived(false)); - model = BinaryData.fromObject(model).toObject(ModelContainerInner.class); - Assertions.assertEquals("sdtutnwlduyc", model.properties().description()); - Assertions.assertEquals("hyrmewipmvekdx", model.properties().properties().get("kuqgsjjxundxgket")); - Assertions.assertEquals("sqy", model.properties().tags().get("pfoobr")); - Assertions.assertEquals(false, model.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java deleted file mode 100644 index db0008fce8e1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerPropertiesTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerProperties model = - BinaryData - .fromString( - "{\"isArchived\":false,\"latestVersion\":\"waoqvmmb\",\"nextVersion\":\"qfr\",\"description\":\"lkzmegnitgvkxl\",\"properties\":{\"gcealzxwh\":\"drf\",\"yqhlwigdivbkbx\":\"ansym\",\"wasqvdaeyyg\":\"omfaj\",\"zkgimsid\":\"xakjsqzhzb\"},\"tags\":{\"hpqgatjeaahhvj\":\"icddyvvjskgfmocw\",\"jjidjk\":\"hnakzyb\"}}") - .toObject(ModelContainerProperties.class); - Assertions.assertEquals("lkzmegnitgvkxl", model.description()); - Assertions.assertEquals("drf", model.properties().get("gcealzxwh")); - Assertions.assertEquals("icddyvvjskgfmocw", model.tags().get("hpqgatjeaahhvj")); - Assertions.assertEquals(false, model.isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerProperties model = - new ModelContainerProperties() - .withDescription("lkzmegnitgvkxl") - .withProperties( - mapOf( - "gcealzxwh", - "drf", - "yqhlwigdivbkbx", - "ansym", - "wasqvdaeyyg", - "omfaj", - "zkgimsid", - "xakjsqzhzb")) - .withTags(mapOf("hpqgatjeaahhvj", "icddyvvjskgfmocw", "jjidjk", "hnakzyb")) - .withIsArchived(false); - model = BinaryData.fromObject(model).toObject(ModelContainerProperties.class); - Assertions.assertEquals("lkzmegnitgvkxl", model.description()); - Assertions.assertEquals("drf", model.properties().get("gcealzxwh")); - Assertions.assertEquals("icddyvvjskgfmocw", model.tags().get("hpqgatjeaahhvj")); - Assertions.assertEquals(false, model.isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java deleted file mode 100644 index f1278bd93c0a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainerResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelContainerInner; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import com.azure.resourcemanager.machinelearning.models.ModelContainerResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelContainerResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelContainerResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"m\",\"value\":[{\"properties\":{\"isArchived\":false,\"latestVersion\":\"iwrxgkn\",\"nextVersion\":\"vyi\",\"description\":\"qodfvp\",\"properties\":{},\"tags\":{}},\"id\":\"xgsg\",\"name\":\"p\",\"type\":\"gzdjtxvzf\"}]}") - .toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("m", model.nextLink()); - Assertions.assertEquals("qodfvp", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelContainerResourceArmPaginatedResult model = - new ModelContainerResourceArmPaginatedResult() - .withNextLink("m") - .withValue( - Arrays - .asList( - new ModelContainerInner() - .withProperties( - new ModelContainerProperties() - .withDescription("qodfvp") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsArchived(false)))); - model = BinaryData.fromObject(model).toObject(ModelContainerResourceArmPaginatedResult.class); - Assertions.assertEquals("m", model.nextLink()); - Assertions.assertEquals("qodfvp", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index da6ac506a573..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersCreateOrUpdateWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import com.azure.resourcemanager.machinelearning.models.ModelContainerProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelContainersCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"ucfzluczdquu\",\"nextVersion\":\"ormvh\",\"description\":\"ielbprnq\",\"properties\":{\"nwsvhbngqiwye\":\"wzcqygg\",\"kunsbfjhhlwtpkv\":\"tobdrrpnre\",\"z\":\"geattbzkg\"},\"tags\":{\"x\":\"qsttewuvcysjeuf\",\"uxlvrhprrvbwonl\":\"lpditfnonpi\",\"huy\":\"qflvtlrvbst\"}},\"id\":\"n\",\"name\":\"nttlnrjd\",\"type\":\"zdbuzici\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = - manager - .modelContainers() - .define("iuepmaxfnzlpqmp") - .withExistingWorkspace("kvy", "fbqvumkxqj") - .withProperties( - new ModelContainerProperties() - .withDescription("rhfcaeooifqdyw") - .withProperties(mapOf("corkfrocgbmxl", "obhahqmomf", "zezbjes", "j")) - .withTags(mapOf("fygpnyhgd", "lurb", "a", "uqs", "y", "qyvoupr")) - .withIsArchived(false)) - .create(); - - Assertions.assertEquals("ielbprnq", response.properties().description()); - Assertions.assertEquals("wzcqygg", response.properties().properties().get("nwsvhbngqiwye")); - Assertions.assertEquals("qsttewuvcysjeuf", response.properties().tags().get("x")); - Assertions.assertEquals(true, response.properties().isArchived()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java deleted file mode 100644 index e845861d1b84..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelContainersDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .modelContainers() - .deleteWithResponse("dwsngkr", "ihscjvakmhzbhw", "hf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java deleted file mode 100644 index ad48156c20db..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelContainersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isArchived\":true,\"latestVersion\":\"yrletndqlmf\",\"nextVersion\":\"gnbbuypwovvvsfle\",\"description\":\"noqayrehjuqwvap\",\"properties\":{\"qzubfonfd\":\"zhpzihacenqqzlx\",\"jcw\":\"gmkfw\",\"zl\":\"ewfhxwyrkbre\"},\"tags\":{\"mkaeplrajubow\":\"jpch\",\"aoklfnis\":\"ywevtjrieikmw\",\"tjcyyuv\":\"xgucbmtredscnn\",\"ecwwtz\":\"zrxzhc\"}},\"id\":\"cloyhy\",\"name\":\"pgidhzgyresgzsdt\",\"type\":\"wbyorjplbchych\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelContainer response = - manager - .modelContainers() - .getWithResponse("wihbnnxemv", "nuqqkotauratnicp", "fzs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("noqayrehjuqwvap", response.properties().description()); - Assertions.assertEquals("zhpzihacenqqzlx", response.properties().properties().get("qzubfonfd")); - Assertions.assertEquals("jpch", response.properties().tags().get("mkaeplrajubow")); - Assertions.assertEquals(true, response.properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java deleted file mode 100644 index 2dfc50920607..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelContainersListMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelContainer; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelContainersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"isArchived\":true,\"latestVersion\":\"d\",\"nextVersion\":\"palvngtw\",\"description\":\"skwgqr\",\"properties\":{\"zuppiyx\":\"umdrcjlvkrkegty\"},\"tags\":{\"eqzqvabmhvs\":\"iydd\",\"ewxtrl\":\"xduetbapfc\",\"kjpirgzxvbczw\":\"bpxya\",\"i\":\"yegbthms\"}},\"id\":\"buiggrunozf\",\"name\":\"u\",\"type\":\"ljthoiv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .modelContainers() - .list("xlxicwgp", "hdcfm", "z", 1474735813, ListViewType.ACTIVE_ONLY, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("skwgqr", response.iterator().next().properties().description()); - Assertions.assertEquals("umdrcjlvkrkegty", response.iterator().next().properties().properties().get("zuppiyx")); - Assertions.assertEquals("iydd", response.iterator().next().properties().tags().get("eqzqvabmhvs")); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java deleted file mode 100644 index 7c9bfac16a2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionInner model = - BinaryData - .fromString( - "{\"properties\":{\"flavors\":{\"ckknhxkizvy\":{\"data\":{}},\"rzvul\":{\"data\":{}},\"aaeranokqgukk\":{\"data\":{}},\"nvbroylaxx\":{\"data\":{}}},\"jobName\":\"cdisd\",\"modelType\":\"fj\",\"modelUri\":\"svgjrwhryvy\",\"isAnonymous\":false,\"isArchived\":false,\"description\":\"xgccknfnw\",\"properties\":{\"dxihc\":\"mvpdvjdhttzaef\",\"bg\":\"rphkmcrjdqnsdfz\",\"euutlwxezwzh\":\"gkylkdghr\"},\"tags\":{\"ehgpp\":\"bwnhhtql\",\"csheafidltugsr\":\"pifhpfeoajvgcxtx\"}},\"id\":\"mks\",\"name\":\"jhoiftxfkfweg\",\"type\":\"rhptilluc\"}") - .toObject(ModelVersionInner.class); - Assertions.assertEquals("xgccknfnw", model.properties().description()); - Assertions.assertEquals("mvpdvjdhttzaef", model.properties().properties().get("dxihc")); - Assertions.assertEquals("bwnhhtql", model.properties().tags().get("ehgpp")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("cdisd", model.properties().jobName()); - Assertions.assertEquals("fj", model.properties().modelType()); - Assertions.assertEquals("svgjrwhryvy", model.properties().modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionInner model = - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("xgccknfnw") - .withProperties( - mapOf("dxihc", "mvpdvjdhttzaef", "bg", "rphkmcrjdqnsdfz", "euutlwxezwzh", "gkylkdghr")) - .withTags(mapOf("ehgpp", "bwnhhtql", "csheafidltugsr", "pifhpfeoajvgcxtx")) - .withIsAnonymous(false) - .withIsArchived(false) - .withFlavors( - mapOf( - "ckknhxkizvy", - new FlavorData().withData(mapOf()), - "rzvul", - new FlavorData().withData(mapOf()), - "aaeranokqgukk", - new FlavorData().withData(mapOf()), - "nvbroylaxx", - new FlavorData().withData(mapOf()))) - .withJobName("cdisd") - .withModelType("fj") - .withModelUri("svgjrwhryvy")); - model = BinaryData.fromObject(model).toObject(ModelVersionInner.class); - Assertions.assertEquals("xgccknfnw", model.properties().description()); - Assertions.assertEquals("mvpdvjdhttzaef", model.properties().properties().get("dxihc")); - Assertions.assertEquals("bwnhhtql", model.properties().tags().get("ehgpp")); - Assertions.assertEquals(false, model.properties().isAnonymous()); - Assertions.assertEquals(false, model.properties().isArchived()); - Assertions.assertEquals("cdisd", model.properties().jobName()); - Assertions.assertEquals("fj", model.properties().modelType()); - Assertions.assertEquals("svgjrwhryvy", model.properties().modelUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java deleted file mode 100644 index ebd2e8723618..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionPropertiesTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.FlavorData; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionProperties model = - BinaryData - .fromString( - "{\"flavors\":{\"a\":{\"data\":{\"sldrizetpwbral\":\"dqohmc\",\"qzmiza\":\"libph\"}},\"thwtzol\":{\"data\":{\"lhjlmuoyxprimr\":\"kjpdnjzhajo\",\"eislstvasylwx\":\"opteecj\",\"eoohguufuzboyj\":\"zaum\"}},\"zaapmudqmeqwi\":{\"data\":{\"lxveabfqx\":\"mwmdxmebwjscjpa\",\"ijddtvqc\":\"mwmqtibx\",\"jaeukmrsieekpn\":\"tad\"}}},\"jobName\":\"ibudqwy\",\"modelType\":\"beybpmzznrtffyaq\",\"modelUri\":\"mhh\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"hvseufuqyrx\",\"properties\":{\"sismjqfrddga\":\"cgq\",\"disyirnxz\":\"quhiosrsjuivf\",\"revkhgnlnzo\":\"czexrxzbujrtrhqv\"},\"tags\":{\"tszcofizehtdhgb\":\"rpiqywncv\",\"reljeamur\":\"k\",\"xlpm\":\"zmlovuanash\"}}") - .toObject(ModelVersionProperties.class); - Assertions.assertEquals("hvseufuqyrx", model.description()); - Assertions.assertEquals("cgq", model.properties().get("sismjqfrddga")); - Assertions.assertEquals("rpiqywncv", model.tags().get("tszcofizehtdhgb")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("dqohmc", model.flavors().get("a").data().get("sldrizetpwbral")); - Assertions.assertEquals("ibudqwy", model.jobName()); - Assertions.assertEquals("beybpmzznrtffyaq", model.modelType()); - Assertions.assertEquals("mhh", model.modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionProperties model = - new ModelVersionProperties() - .withDescription("hvseufuqyrx") - .withProperties( - mapOf("sismjqfrddga", "cgq", "disyirnxz", "quhiosrsjuivf", "revkhgnlnzo", "czexrxzbujrtrhqv")) - .withTags(mapOf("tszcofizehtdhgb", "rpiqywncv", "reljeamur", "k", "xlpm", "zmlovuanash")) - .withIsAnonymous(true) - .withIsArchived(false) - .withFlavors( - mapOf( - "a", - new FlavorData().withData(mapOf("sldrizetpwbral", "dqohmc", "qzmiza", "libph")), - "thwtzol", - new FlavorData() - .withData( - mapOf( - "lhjlmuoyxprimr", - "kjpdnjzhajo", - "eislstvasylwx", - "opteecj", - "eoohguufuzboyj", - "zaum")), - "zaapmudqmeqwi", - new FlavorData() - .withData( - mapOf( - "lxveabfqx", "mwmdxmebwjscjpa", "ijddtvqc", "mwmqtibx", "jaeukmrsieekpn", "tad")))) - .withJobName("ibudqwy") - .withModelType("beybpmzznrtffyaq") - .withModelUri("mhh"); - model = BinaryData.fromObject(model).toObject(ModelVersionProperties.class); - Assertions.assertEquals("hvseufuqyrx", model.description()); - Assertions.assertEquals("cgq", model.properties().get("sismjqfrddga")); - Assertions.assertEquals("rpiqywncv", model.tags().get("tszcofizehtdhgb")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("dqohmc", model.flavors().get("a").data().get("sldrizetpwbral")); - Assertions.assertEquals("ibudqwy", model.jobName()); - Assertions.assertEquals("beybpmzznrtffyaq", model.modelType()); - Assertions.assertEquals("mhh", model.modelUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java deleted file mode 100644 index bc48204938a5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ModelVersionInner; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import com.azure.resourcemanager.machinelearning.models.ModelVersionResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ModelVersionResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ModelVersionResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"xkyxvxevblbj\",\"value\":[{\"properties\":{\"flavors\":{},\"jobName\":\"lageuaulxun\",\"modelType\":\"jbnkpp\",\"modelUri\":\"nenlsvxeizzg\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"mffeycxcktpi\",\"properties\":{},\"tags\":{}},\"id\":\"teeammxqiekkkzd\",\"name\":\"rtkgdojbmxvavref\",\"type\":\"eesvecu\"},{\"properties\":{\"flavors\":{},\"jobName\":\"xtxsuwprtujw\",\"modelType\":\"wddji\",\"modelUri\":\"bxv\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"zeexavoxtfgle\",\"properties\":{},\"tags\":{}},\"id\":\"qbw\",\"name\":\"ypq\",\"type\":\"gsfjac\"},{\"properties\":{\"flavors\":{},\"jobName\":\"hhxud\",\"modelType\":\"vodhtn\",\"modelUri\":\"rudhzmmesckdl\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"x\",\"properties\":{},\"tags\":{}},\"id\":\"cfxwmdbox\",\"name\":\"fgsftufqob\",\"type\":\"jln\"}]}") - .toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("xkyxvxevblbj", model.nextLink()); - Assertions.assertEquals("mffeycxcktpi", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("lageuaulxun", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jbnkpp", model.value().get(0).properties().modelType()); - Assertions.assertEquals("nenlsvxeizzg", model.value().get(0).properties().modelUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ModelVersionResourceArmPaginatedResult model = - new ModelVersionResourceArmPaginatedResult() - .withNextLink("xkyxvxevblbj") - .withValue( - Arrays - .asList( - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("mffeycxcktpi") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(false) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("lageuaulxun") - .withModelType("jbnkpp") - .withModelUri("nenlsvxeizzg")), - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("zeexavoxtfgle") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(false) - .withFlavors(mapOf()) - .withJobName("xtxsuwprtujw") - .withModelType("wddji") - .withModelUri("bxv")), - new ModelVersionInner() - .withProperties( - new ModelVersionProperties() - .withDescription("x") - .withProperties(mapOf()) - .withTags(mapOf()) - .withIsAnonymous(true) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("hhxud") - .withModelType("vodhtn") - .withModelUri("rudhzmmesckdl")))); - model = BinaryData.fromObject(model).toObject(ModelVersionResourceArmPaginatedResult.class); - Assertions.assertEquals("xkyxvxevblbj", model.nextLink()); - Assertions.assertEquals("mffeycxcktpi", model.value().get(0).properties().description()); - Assertions.assertEquals(false, model.value().get(0).properties().isAnonymous()); - Assertions.assertEquals(true, model.value().get(0).properties().isArchived()); - Assertions.assertEquals("lageuaulxun", model.value().get(0).properties().jobName()); - Assertions.assertEquals("jbnkpp", model.value().get(0).properties().modelType()); - Assertions.assertEquals("nenlsvxeizzg", model.value().get(0).properties().modelUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index c8e1e71d6e40..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import com.azure.resourcemanager.machinelearning.models.ModelVersionProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelVersionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"flavors\":{},\"jobName\":\"icjuft\",\"modelType\":\"iooanduewfhv\",\"modelUri\":\"jhxzubfjzabbwzgv\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"dckixspsaigavkmv\",\"properties\":{\"yetjxryo\":\"erejrkpzj\",\"pemnrrabo\":\"taeitwhlbecgihz\"},\"tags\":{\"pskpeswyhhmif\":\"wxywpjhspboxhif\",\"y\":\"uajxwwvcmmpeg\",\"exbzbqufpnezsjza\":\"qvcml\",\"dror\":\"m\"}},\"id\":\"ogzmsimehtcuuwdh\",\"name\":\"qqhyhnimxtns\",\"type\":\"gi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = - manager - .modelVersions() - .define("nmxynlsuqbwzst") - .withExistingModel("tfbjampq", "c", "a") - .withProperties( - new ModelVersionProperties() - .withDescription("okr") - .withProperties( - mapOf( - "pujzfl", "sgaojbtqpqsdoctp", "wlluunxhfwlfxz", "cdsgxceluji", "eupcknecexkgrv", "wu")) - .withTags( - mapOf( - "wawoxcgzbejqf", - "jdmngsytqpdzfyxc", - "xdwdrpazqjkrfm", - "ifopf", - "gtji", - "wotfcuu", - "cjjkmqenh", - "pgayiawohfmhnnzm")) - .withIsAnonymous(false) - .withIsArchived(true) - .withFlavors(mapOf()) - .withJobName("vpatrgjjk") - .withModelType("i") - .withModelUri("hoksmmculwk")) - .create(); - - Assertions.assertEquals("dckixspsaigavkmv", response.properties().description()); - Assertions.assertEquals("erejrkpzj", response.properties().properties().get("yetjxryo")); - Assertions.assertEquals("wxywpjhspboxhif", response.properties().tags().get("pskpeswyhhmif")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("icjuft", response.properties().jobName()); - Assertions.assertEquals("iooanduewfhv", response.properties().modelType()); - Assertions.assertEquals("jhxzubfjzabbwzgv", response.properties().modelUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java deleted file mode 100644 index ccb3cf60148a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelVersionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .modelVersions() - .deleteWithResponse( - "rmuhcuhtuzlx", "wyopgarpfctwrapc", "dojq", "vzesipiys", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java deleted file mode 100644 index 4e24bc5af0c3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelVersionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"flavors\":{},\"jobName\":\"yrkqa\",\"modelType\":\"fajfreprfvmki\",\"modelUri\":\"teyrqshi\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"pylblfsprrwc\",\"properties\":{\"rdytzfslxizhq\":\"mtcvvf\",\"cdiiisklbonx\":\"kmgobliqe\"},\"tags\":{\"wkosnyxigf\":\"jxvtrkfkgenjqnnp\",\"kwopswnyinxupr\":\"ujjcxgdqmrlhn\",\"uekdcpvu\":\"xyxwjezbfqplo\"}},\"id\":\"rsvjmnsvujnjktv\",\"name\":\"lefcjis\",\"type\":\"pkdbx\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ModelVersion response = - manager - .modelVersions() - .getWithResponse( - "jqyowaadc", "dazabundtse", "kaupwhlz", "ckremgjlmsvdorsi", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("pylblfsprrwc", response.properties().description()); - Assertions.assertEquals("mtcvvf", response.properties().properties().get("rdytzfslxizhq")); - Assertions.assertEquals("jxvtrkfkgenjqnnp", response.properties().tags().get("wkosnyxigf")); - Assertions.assertEquals(false, response.properties().isAnonymous()); - Assertions.assertEquals(true, response.properties().isArchived()); - Assertions.assertEquals("yrkqa", response.properties().jobName()); - Assertions.assertEquals("fajfreprfvmki", response.properties().modelType()); - Assertions.assertEquals("teyrqshi", response.properties().modelUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java deleted file mode 100644 index 3ce927ed9a2a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ModelVersionsListMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ListViewType; -import com.azure.resourcemanager.machinelearning.models.ModelVersion; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ModelVersionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"flavors\":{},\"jobName\":\"cjiwgsxfaio\",\"modelType\":\"dgujjgnfgrzxbarc\",\"modelUri\":\"aefzqsy\",\"isAnonymous\":false,\"isArchived\":true,\"description\":\"cytesmf\",\"properties\":{\"uauzmz\":\"tfodq\"},\"tags\":{\"udxdyyrudmahswt\":\"trfzhhezvh\",\"sgfenffdxb\":\"dkxbq\"}},\"id\":\"fqjchivdrij\",\"name\":\"nxndmuvardlmzjo\",\"type\":\"p\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .modelVersions() - .list( - "ppoqvgpnewuhwfwj", - "oxuo", - "tfnressfepgck", - "cjmgvsnvbtqdxfm", - "ym", - 253482079, - "hjluqllbsupubdx", - "kdlhzwhc", - 1124583033, - "vbosjj", - "dizhrjqfyaytvsly", - "kcgn", - ListViewType.ARCHIVED_ONLY, - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cytesmf", response.iterator().next().properties().description()); - Assertions.assertEquals("tfodq", response.iterator().next().properties().properties().get("uauzmz")); - Assertions.assertEquals("trfzhhezvh", response.iterator().next().properties().tags().get("udxdyyrudmahswt")); - Assertions.assertEquals(false, response.iterator().next().properties().isAnonymous()); - Assertions.assertEquals(true, response.iterator().next().properties().isArchived()); - Assertions.assertEquals("cjiwgsxfaio", response.iterator().next().properties().jobName()); - Assertions.assertEquals("dgujjgnfgrzxbarc", response.iterator().next().properties().modelType()); - Assertions.assertEquals("aefzqsy", response.iterator().next().properties().modelUri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java deleted file mode 100644 index 44975c7627f6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/MpiTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Mpi; -import org.junit.jupiter.api.Assertions; - -public final class MpiTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mpi model = - BinaryData - .fromString("{\"distributionType\":\"Mpi\",\"processCountPerInstance\":589201934}") - .toObject(Mpi.class); - Assertions.assertEquals(589201934, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mpi model = new Mpi().withProcessCountPerInstance(589201934); - model = BinaryData.fromObject(model).toObject(Mpi.class); - Assertions.assertEquals(589201934, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java deleted file mode 100644 index a68e62ee8d8b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NCrossValidationsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; - -public final class NCrossValidationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NCrossValidations model = - BinaryData.fromString("{\"mode\":\"NCrossValidations\"}").toObject(NCrossValidations.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NCrossValidations model = new NCrossValidations(); - model = BinaryData.fromObject(model).toObject(NCrossValidations.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java deleted file mode 100644 index 2ee39e50710c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalFeaturizationSettingsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalFeaturizationSettings model = - BinaryData.fromString("{\"datasetLanguage\":\"ns\"}").toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("ns", model.datasetLanguage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalFeaturizationSettings model = new NlpVerticalFeaturizationSettings().withDatasetLanguage("ns"); - model = BinaryData.fromObject(model).toObject(NlpVerticalFeaturizationSettings.class); - Assertions.assertEquals("ns", model.datasetLanguage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java deleted file mode 100644 index 772b65dcba64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalLimitSettingsTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVerticalLimitSettings model = - BinaryData - .fromString("{\"maxConcurrentTrials\":422661668,\"maxTrials\":768209268,\"timeout\":\"PT230H9M19S\"}") - .toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(422661668, model.maxConcurrentTrials()); - Assertions.assertEquals(768209268, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT230H9M19S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVerticalLimitSettings model = - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(422661668) - .withMaxTrials(768209268) - .withTimeout(Duration.parse("PT230H9M19S")); - model = BinaryData.fromObject(model).toObject(NlpVerticalLimitSettings.class); - Assertions.assertEquals(422661668, model.maxConcurrentTrials()); - Assertions.assertEquals(768209268, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT230H9M19S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java deleted file mode 100644 index e9e0709289f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NlpVerticalTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVertical; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class NlpVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NlpVertical model = - BinaryData - .fromString( - "{\"featurizationSettings\":{\"datasetLanguage\":\"ubmomsgvvjh\"},\"limitSettings\":{\"maxConcurrentTrials\":1113718862,\"maxTrials\":1386794835,\"timeout\":\"PT207H58M31S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"majnkd\",\"description\":\"q\"}}") - .toObject(NlpVertical.class); - Assertions.assertEquals("ubmomsgvvjh", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1113718862, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1386794835, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT207H58M31S"), model.limitSettings().timeout()); - Assertions.assertEquals("q", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("majnkd", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NlpVertical model = - new NlpVertical() - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("ubmomsgvvjh")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1113718862) - .withMaxTrials(1386794835) - .withTimeout(Duration.parse("PT207H58M31S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("q") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("majnkd")); - model = BinaryData.fromObject(model).toObject(NlpVertical.class); - Assertions.assertEquals("ubmomsgvvjh", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1113718862, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1386794835, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT207H58M31S"), model.limitSettings().timeout()); - Assertions.assertEquals("q", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("majnkd", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java deleted file mode 100644 index a7c0d6a48f64..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NodeStateCountsTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.NodeStateCounts; - -public final class NodeStateCountsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NodeStateCounts model = - BinaryData - .fromString( - "{\"idleNodeCount\":1191856604,\"runningNodeCount\":715935859,\"preparingNodeCount\":2047901283,\"unusableNodeCount\":1346181735,\"leavingNodeCount\":1358224808,\"preemptedNodeCount\":304822445}") - .toObject(NodeStateCounts.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NodeStateCounts model = new NodeStateCounts(); - model = BinaryData.fromObject(model).toObject(NodeStateCounts.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java deleted file mode 100644 index 5eae0e57bdc6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/NoneAuthTypeWorkspaceConnectionPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.NoneAuthTypeWorkspaceConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import org.junit.jupiter.api.Assertions; - -public final class NoneAuthTypeWorkspaceConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model = - BinaryData - .fromString( - "{\"authType\":\"None\",\"category\":\"Git\",\"target\":\"lazipbhpwvq\",\"value\":\"ny\",\"valueFormat\":\"JSON\"}") - .toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("lazipbhpwvq", model.target()); - Assertions.assertEquals("ny", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NoneAuthTypeWorkspaceConnectionProperties model = - new NoneAuthTypeWorkspaceConnectionProperties() - .withCategory(ConnectionCategory.GIT) - .withTarget("lazipbhpwvq") - .withValue("ny") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(NoneAuthTypeWorkspaceConnectionProperties.class); - Assertions.assertEquals(ConnectionCategory.GIT, model.category()); - Assertions.assertEquals("lazipbhpwvq", model.target()); - Assertions.assertEquals("ny", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java deleted file mode 100644 index 9dd9d1215124..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ObjectiveTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Goal; -import com.azure.resourcemanager.machinelearning.models.Objective; -import org.junit.jupiter.api.Assertions; - -public final class ObjectiveTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Objective model = - BinaryData - .fromString("{\"goal\":\"Minimize\",\"primaryMetric\":\"qxjoshohtotryeg\"}") - .toObject(Objective.class); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - Assertions.assertEquals("qxjoshohtotryeg", model.primaryMetric()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Objective model = new Objective().withGoal(Goal.MINIMIZE).withPrimaryMetric("qxjoshohtotryeg"); - model = BinaryData.fromObject(model).toObject(Objective.class); - Assertions.assertEquals(Goal.MINIMIZE, model.goal()); - Assertions.assertEquals("qxjoshohtotryeg", model.primaryMetric()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index a326c433a7b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentTrackedResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineDeploymentInner; -import com.azure.resourcemanager.machinelearning.models.EgressPublicNetworkAccessType; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentProperties; -import com.azure.resourcemanager.machinelearning.models.OnlineDeploymentTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OnlineDeploymentTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineDeploymentTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"rprsnm\",\"value\":[{\"identity\":{\"principalId\":\"4da85e2a-d4e0-4d4c-95ab-041badbdf8b9\",\"tenantId\":\"16df482c-d39e-4be2-9abe-ddba471908e5\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"lbkpb\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":false,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"jh\",\"model\":\"vechndbnwiehole\",\"modelMountPath\":\"wiuub\",\"provisioningState\":\"Succeeded\",\"description\":\"aqtferr\",\"environmentId\":\"ex\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"xap\",\"tier\":\"Free\",\"size\":\"qqnobpudcd\",\"family\":\"tqwpwya\",\"capacity\":2036163978},\"location\":\"sqbuc\",\"tags\":{\"sdaultxij\":\"kyexaoguyaipi\",\"qwazlnqnmcjngzq\":\"um\",\"sf\":\"qxtbjwgnyf\"},\"id\":\"svtui\",\"name\":\"zh\",\"type\":\"jqg\"},{\"identity\":{\"principalId\":\"0ddd2460-1f6c-4ca7-a3bb-8be70bc2fc6a\",\"tenantId\":\"a55475da-8d74-41aa-b7bd-fc2075054554\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"qryxyn\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":true,\"egressPublicNetworkAccess\":\"Disabled\",\"instanceType\":\"sovwxznptgoeiyb\",\"model\":\"pfhvfslk\",\"modelMountPath\":\"tjlrigjksky\",\"provisioningState\":\"Creating\",\"description\":\"sxwaabzm\",\"environmentId\":\"rygznmmaxriz\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"gopxlhslnelxie\",\"tier\":\"Basic\",\"size\":\"llxecwc\",\"family\":\"jphslhcaw\",\"capacity\":224494261},\"location\":\"fdwfmvigorqj\",\"tags\":{\"n\":\"zhraglkafh\"},\"id\":\"juj\",\"name\":\"ickpz\",\"type\":\"cpopmxel\"},{\"identity\":{\"principalId\":\"0f14930d-5df5-4097-9b70-8c82d3a4bfcb\",\"tenantId\":\"bbf6d45e-ad6b-4e4a-97f7-a7c3941dcbf1\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"edexxmlfm\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":true,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"uawxtzx\",\"model\":\"mwabzxrvxc\",\"modelMountPath\":\"hsphaivmxyas\",\"provisioningState\":\"Deleting\",\"description\":\"ywakoihk\",\"environmentId\":\"mjblmljhlny\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"qyryuzcbmqqvxm\",\"tier\":\"Standard\",\"size\":\"tayx\",\"family\":\"supe\",\"capacity\":2074822274},\"location\":\"qnhcvsqltnzoibg\",\"tags\":{\"qoxwd\":\"nxfyqonm\"},\"id\":\"fdbxiqxeiiqbim\",\"name\":\"tmwwi\",\"type\":\"h\"},{\"identity\":{\"principalId\":\"8b9a4105-dd9b-43ff-91e1-ba1a28c9f57b\",\"tenantId\":\"2a050a31-f610-475f-948f-53b51c0d42ca\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"vwbcblembnkbwv\",\"properties\":{\"endpointComputeType\":\"OnlineDeploymentProperties\",\"appInsightsEnabled\":false,\"egressPublicNetworkAccess\":\"Enabled\",\"instanceType\":\"vqihebwtswbzuwf\",\"model\":\"ragegi\",\"modelMountPath\":\"cjfelisdjubgg\",\"provisioningState\":\"Failed\",\"description\":\"sazgakgacyrcmj\",\"environmentId\":\"spofapvuhry\",\"environmentVariables\":{},\"properties\":{}},\"sku\":{\"name\":\"frzgbzjed\",\"tier\":\"Premium\",\"size\":\"vnlvxbcuiiznktwf\",\"family\":\"snvpdibmi\",\"capacity\":1037622433},\"location\":\"bzbkiw\",\"tags\":{\"ophzfylsgcrp\":\"n\",\"fwyfwlwxjwet\":\"bcunezzceze\",\"zvaylptrsqqw\":\"psihcla\"},\"id\":\"tcmwqkchc\",\"name\":\"waxfewzjkj\",\"type\":\"xfdeqvhpsyl\"}]}") - .toObject(OnlineDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("rprsnm", model.nextLink()); - Assertions.assertEquals("sqbuc", model.value().get(0).location()); - Assertions.assertEquals("kyexaoguyaipi", model.value().get(0).tags().get("sdaultxij")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lbkpb", model.value().get(0).kind()); - Assertions.assertEquals("aqtferr", model.value().get(0).properties().description()); - Assertions.assertEquals("ex", model.value().get(0).properties().environmentId()); - Assertions.assertEquals(false, model.value().get(0).properties().appInsightsEnabled()); - Assertions - .assertEquals( - EgressPublicNetworkAccessType.ENABLED, model.value().get(0).properties().egressPublicNetworkAccess()); - Assertions.assertEquals("jh", model.value().get(0).properties().instanceType()); - Assertions.assertEquals("vechndbnwiehole", model.value().get(0).properties().model()); - Assertions.assertEquals("wiuub", model.value().get(0).properties().modelMountPath()); - Assertions.assertEquals("xap", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("qqnobpudcd", model.value().get(0).sku().size()); - Assertions.assertEquals("tqwpwya", model.value().get(0).sku().family()); - Assertions.assertEquals(2036163978, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineDeploymentTrackedResourceArmPaginatedResult model = - new OnlineDeploymentTrackedResourceArmPaginatedResult() - .withNextLink("rprsnm") - .withValue( - Arrays - .asList( - new OnlineDeploymentInner() - .withLocation("sqbuc") - .withTags( - mapOf("sdaultxij", "kyexaoguyaipi", "qwazlnqnmcjngzq", "um", "sf", "qxtbjwgnyf")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("lbkpb") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("aqtferr") - .withEnvironmentId("ex") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(false) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("jh") - .withModel("vechndbnwiehole") - .withModelMountPath("wiuub")) - .withSku( - new Sku() - .withName("xap") - .withTier(SkuTier.FREE) - .withSize("qqnobpudcd") - .withFamily("tqwpwya") - .withCapacity(2036163978)), - new OnlineDeploymentInner() - .withLocation("fdwfmvigorqj") - .withTags(mapOf("n", "zhraglkafh")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("qryxyn") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("sxwaabzm") - .withEnvironmentId("rygznmmaxriz") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(true) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.DISABLED) - .withInstanceType("sovwxznptgoeiyb") - .withModel("pfhvfslk") - .withModelMountPath("tjlrigjksky")) - .withSku( - new Sku() - .withName("gopxlhslnelxie") - .withTier(SkuTier.BASIC) - .withSize("llxecwc") - .withFamily("jphslhcaw") - .withCapacity(224494261)), - new OnlineDeploymentInner() - .withLocation("qnhcvsqltnzoibg") - .withTags(mapOf("qoxwd", "nxfyqonm")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("edexxmlfm") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("ywakoihk") - .withEnvironmentId("mjblmljhlny") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(true) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("uawxtzx") - .withModel("mwabzxrvxc") - .withModelMountPath("hsphaivmxyas")) - .withSku( - new Sku() - .withName("qyryuzcbmqqvxm") - .withTier(SkuTier.STANDARD) - .withSize("tayx") - .withFamily("supe") - .withCapacity(2074822274)), - new OnlineDeploymentInner() - .withLocation("bzbkiw") - .withTags( - mapOf( - "ophzfylsgcrp", "n", "fwyfwlwxjwet", "bcunezzceze", "zvaylptrsqqw", "psihcla")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("vwbcblembnkbwv") - .withProperties( - new OnlineDeploymentProperties() - .withDescription("sazgakgacyrcmj") - .withEnvironmentId("spofapvuhry") - .withEnvironmentVariables(mapOf()) - .withProperties(mapOf()) - .withAppInsightsEnabled(false) - .withEgressPublicNetworkAccess(EgressPublicNetworkAccessType.ENABLED) - .withInstanceType("vqihebwtswbzuwf") - .withModel("ragegi") - .withModelMountPath("cjfelisdjubgg")) - .withSku( - new Sku() - .withName("frzgbzjed") - .withTier(SkuTier.PREMIUM) - .withSize("vnlvxbcuiiznktwf") - .withFamily("snvpdibmi") - .withCapacity(1037622433)))); - model = BinaryData.fromObject(model).toObject(OnlineDeploymentTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("rprsnm", model.nextLink()); - Assertions.assertEquals("sqbuc", model.value().get(0).location()); - Assertions.assertEquals("kyexaoguyaipi", model.value().get(0).tags().get("sdaultxij")); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("lbkpb", model.value().get(0).kind()); - Assertions.assertEquals("aqtferr", model.value().get(0).properties().description()); - Assertions.assertEquals("ex", model.value().get(0).properties().environmentId()); - Assertions.assertEquals(false, model.value().get(0).properties().appInsightsEnabled()); - Assertions - .assertEquals( - EgressPublicNetworkAccessType.ENABLED, model.value().get(0).properties().egressPublicNetworkAccess()); - Assertions.assertEquals("jh", model.value().get(0).properties().instanceType()); - Assertions.assertEquals("vechndbnwiehole", model.value().get(0).properties().model()); - Assertions.assertEquals("wiuub", model.value().get(0).properties().modelMountPath()); - Assertions.assertEquals("xap", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("qqnobpudcd", model.value().get(0).sku().size()); - Assertions.assertEquals("tqwpwya", model.value().get(0).sku().family()); - Assertions.assertEquals(2036163978, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java deleted file mode 100644 index aba6309a97e8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .onlineDeployments() - .delete("mbhdo", "m", "ngkqlgxzduvxd", "xexatmdmnrs", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java deleted file mode 100644 index 260040167db7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsGetLogsWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ContainerType; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogs; -import com.azure.resourcemanager.machinelearning.models.DeploymentLogsRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsGetLogsWithResponseMockTests { - @Test - public void testGetLogsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"content\":\"exvtemasp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DeploymentLogs response = - manager - .onlineDeployments() - .getLogsWithResponse( - "qtlfoz", - "umrtgjqg", - "cant", - "syxzxjmkanbc", - new DeploymentLogsRequest().withContainerType(ContainerType.INFERENCE_SERVER).withTail(129296832), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("exvtemasp", response.content()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java deleted file mode 100644 index 3ee3e1add3d8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineDeploymentsListSkusMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.SkuResource; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OnlineDeploymentsListSkusMockTests { - @Test - public void testListSkus() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"capacity\":{\"default\":535751545,\"maximum\":1856017180,\"minimum\":1547287008,\"scaleType\":\"Automatic\"},\"resourceType\":\"iv\",\"sku\":{\"name\":\"jybsrwz\",\"tier\":\"Free\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .onlineDeployments() - .listSkus("anydsc", "k", "w", "pwjc", 1694569219, "aahntofelfh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(535751545, response.iterator().next().capacity().defaultProperty()); - Assertions.assertEquals(1856017180, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1547287008, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, response.iterator().next().capacity().scaleType()); - Assertions.assertEquals("jybsrwz", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.iterator().next().sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.java deleted file mode 100644 index b5c43b64a29e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointTrackedResourceArmPaginatedResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.OnlineEndpointInner; -import com.azure.resourcemanager.machinelearning.models.EndpointAuthMode; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointProperties; -import com.azure.resourcemanager.machinelearning.models.OnlineEndpointTrackedResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccessType; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class OnlineEndpointTrackedResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineEndpointTrackedResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"hxgsrboldfor\",\"value\":[{\"identity\":{\"principalId\":\"1f6aefd4-b02f-4a33-a590-718f0cb48b50\",\"tenantId\":\"57f14320-4135-4edf-99b3-3048e39f355a\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"fhfovv\",\"properties\":{\"compute\":\"qpbtuodxes\",\"provisioningState\":\"Creating\",\"publicNetworkAccess\":\"Enabled\",\"traffic\":{},\"authMode\":\"AADToken\",\"description\":\"umuaslzkwrrwoycq\",\"properties\":{},\"scoringUri\":\"hahnomdrkywuhps\",\"swaggerUri\":\"uurutlwexxwlalni\"},\"sku\":{\"name\":\"zsrzpgepq\",\"tier\":\"Free\",\"size\":\"wwpgdakchzyvlixq\",\"family\":\"kcxk\",\"capacity\":330254773},\"location\":\"xmysuxswqrntv\",\"tags\":{\"pwcyyufmhr\":\"jpsttexoq\",\"wmqs\":\"nc\"},\"id\":\"kcdqzhlct\",\"name\":\"dunqnd\",\"type\":\"fpch\"},{\"identity\":{\"principalId\":\"a4151eb7-8663-4b97-8345-804b77541a0a\",\"tenantId\":\"7879de7c-a628-4534-a453-c05523e5b09d\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"cgegydcwbo\",\"properties\":{\"compute\":\"umvq\",\"provisioningState\":\"Succeeded\",\"publicNetworkAccess\":\"Disabled\",\"traffic\":{},\"authMode\":\"AMLToken\",\"description\":\"iouaubrjt\",\"properties\":{},\"scoringUri\":\"fuojrngif\",\"swaggerUri\":\"z\"},\"sku\":{\"name\":\"sccbiuimzd\",\"tier\":\"Premium\",\"size\":\"fqwmkyoquf\",\"family\":\"ruzslzoj\",\"capacity\":617076882},\"location\":\"fnmdxotn\",\"tags\":{\"i\":\"gugey\"},\"id\":\"grkyuizabsnmfpph\",\"name\":\"jee\",\"type\":\"yhyhsgzfczb\"},{\"identity\":{\"principalId\":\"ccf81f2a-7aba-4873-b90b-315fea316226\",\"tenantId\":\"eba5c18a-712b-44fe-9aa8-0765f707c485\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"kind\":\"glqgleoh\",\"properties\":{\"compute\":\"etnluankrrfx\",\"provisioningState\":\"Succeeded\",\"publicNetworkAccess\":\"Enabled\",\"traffic\":{},\"authMode\":\"Key\",\"description\":\"acvbmqz\",\"properties\":{},\"scoringUri\":\"lajrnwxacevehj\",\"swaggerUri\":\"yxoaf\"},\"sku\":{\"name\":\"oqltfae\",\"tier\":\"Standard\",\"size\":\"mfgvxirpghriypo\",\"family\":\"yhlqhykprlpyznu\",\"capacity\":184808617},\"location\":\"smexiitdf\",\"tags\":{\"nnust\":\"yasiibmiy\",\"nmgixh\":\"nlj\",\"oudorhcgyyp\":\"mavmq\",\"hu\":\"otwypundmb\"},\"id\":\"cmjkavlgorbmftpm\",\"name\":\"tzfjltf\",\"type\":\"nzcyjtotp\"}]}") - .toObject(OnlineEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("hxgsrboldfor", model.nextLink()); - Assertions.assertEquals("xmysuxswqrntv", model.value().get(0).location()); - Assertions.assertEquals("jpsttexoq", model.value().get(0).tags().get("pwcyyufmhr")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("fhfovv", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.AADTOKEN, model.value().get(0).properties().authMode()); - Assertions.assertEquals("umuaslzkwrrwoycq", model.value().get(0).properties().description()); - Assertions.assertEquals("qpbtuodxes", model.value().get(0).properties().compute()); - Assertions - .assertEquals(PublicNetworkAccessType.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.value().get(0).sku().size()); - Assertions.assertEquals("kcxk", model.value().get(0).sku().family()); - Assertions.assertEquals(330254773, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineEndpointTrackedResourceArmPaginatedResult model = - new OnlineEndpointTrackedResourceArmPaginatedResult() - .withNextLink("hxgsrboldfor") - .withValue( - Arrays - .asList( - new OnlineEndpointInner() - .withLocation("xmysuxswqrntv") - .withTags(mapOf("pwcyyufmhr", "jpsttexoq", "wmqs", "nc")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("fhfovv") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.AADTOKEN) - .withDescription("umuaslzkwrrwoycq") - .withProperties(mapOf()) - .withCompute("qpbtuodxes") - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("zsrzpgepq") - .withTier(SkuTier.FREE) - .withSize("wwpgdakchzyvlixq") - .withFamily("kcxk") - .withCapacity(330254773)), - new OnlineEndpointInner() - .withLocation("fnmdxotn") - .withTags(mapOf("i", "gugey")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("cgegydcwbo") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.AMLTOKEN) - .withDescription("iouaubrjt") - .withProperties(mapOf()) - .withCompute("umvq") - .withPublicNetworkAccess(PublicNetworkAccessType.DISABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("sccbiuimzd") - .withTier(SkuTier.PREMIUM) - .withSize("fqwmkyoquf") - .withFamily("ruzslzoj") - .withCapacity(617076882)), - new OnlineEndpointInner() - .withLocation("smexiitdf") - .withTags( - mapOf( - "nnust", - "yasiibmiy", - "nmgixh", - "nlj", - "oudorhcgyyp", - "mavmq", - "hu", - "otwypundmb")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withKind("glqgleoh") - .withProperties( - new OnlineEndpointProperties() - .withAuthMode(EndpointAuthMode.KEY) - .withDescription("acvbmqz") - .withProperties(mapOf()) - .withCompute("etnluankrrfx") - .withPublicNetworkAccess(PublicNetworkAccessType.ENABLED) - .withTraffic(mapOf())) - .withSku( - new Sku() - .withName("oqltfae") - .withTier(SkuTier.STANDARD) - .withSize("mfgvxirpghriypo") - .withFamily("yhlqhykprlpyznu") - .withCapacity(184808617)))); - model = BinaryData.fromObject(model).toObject(OnlineEndpointTrackedResourceArmPaginatedResult.class); - Assertions.assertEquals("hxgsrboldfor", model.nextLink()); - Assertions.assertEquals("xmysuxswqrntv", model.value().get(0).location()); - Assertions.assertEquals("jpsttexoq", model.value().get(0).tags().get("pwcyyufmhr")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("fhfovv", model.value().get(0).kind()); - Assertions.assertEquals(EndpointAuthMode.AADTOKEN, model.value().get(0).properties().authMode()); - Assertions.assertEquals("umuaslzkwrrwoycq", model.value().get(0).properties().description()); - Assertions.assertEquals("qpbtuodxes", model.value().get(0).properties().compute()); - Assertions - .assertEquals(PublicNetworkAccessType.ENABLED, model.value().get(0).properties().publicNetworkAccess()); - Assertions.assertEquals("zsrzpgepq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.FREE, model.value().get(0).sku().tier()); - Assertions.assertEquals("wwpgdakchzyvlixq", model.value().get(0).sku().size()); - Assertions.assertEquals("kcxk", model.value().get(0).sku().family()); - Assertions.assertEquals(330254773, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java deleted file mode 100644 index ebc153d904fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineEndpointsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OnlineEndpointsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.onlineEndpoints().delete("cbnygd", "c", "xwbpwyykdig", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java deleted file mode 100644 index 29e7ab16920c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineRequestSettingsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineRequestSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class OnlineRequestSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineRequestSettings model = - BinaryData - .fromString( - "{\"maxConcurrentRequestsPerInstance\":1659306080,\"maxQueueWait\":\"PT185H26M24S\",\"requestTimeout\":\"PT152H42M33S\"}") - .toObject(OnlineRequestSettings.class); - Assertions.assertEquals(1659306080, model.maxConcurrentRequestsPerInstance()); - Assertions.assertEquals(Duration.parse("PT185H26M24S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT152H42M33S"), model.requestTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineRequestSettings model = - new OnlineRequestSettings() - .withMaxConcurrentRequestsPerInstance(1659306080) - .withMaxQueueWait(Duration.parse("PT185H26M24S")) - .withRequestTimeout(Duration.parse("PT152H42M33S")); - model = BinaryData.fromObject(model).toObject(OnlineRequestSettings.class); - Assertions.assertEquals(1659306080, model.maxConcurrentRequestsPerInstance()); - Assertions.assertEquals(Duration.parse("PT185H26M24S"), model.maxQueueWait()); - Assertions.assertEquals(Duration.parse("PT152H42M33S"), model.requestTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java deleted file mode 100644 index e77786ec9dac..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OnlineScaleSettingsTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OnlineScaleSettings; - -public final class OnlineScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OnlineScaleSettings model = - BinaryData.fromString("{\"scaleType\":\"OnlineScaleSettings\"}").toObject(OnlineScaleSettings.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OnlineScaleSettings model = new OnlineScaleSettings(); - model = BinaryData.fromObject(model).toObject(OnlineScaleSettings.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.java deleted file mode 100644 index 2e2d86093d61..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OperationsListMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlOperation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"injdllwktlepo\",\"display\":{\"provider\":\"vqxuajgcqw\",\"resource\":\"ynkgfcfd\",\"operation\":\"wsikxxtclhuulr\",\"description\":\"byokvjgbzsxe\"},\"isDataAction\":false}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("injdllwktlepo", response.iterator().next().name()); - Assertions.assertEquals("vqxuajgcqw", response.iterator().next().display().provider()); - Assertions.assertEquals("ynkgfcfd", response.iterator().next().display().resource()); - Assertions.assertEquals("wsikxxtclhuulr", response.iterator().next().display().operation()); - Assertions.assertEquals("byokvjgbzsxe", response.iterator().next().display().description()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java deleted file mode 100644 index 693f796d85b9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/OutputPathAssetReferenceTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputPathAssetReference; -import org.junit.jupiter.api.Assertions; - -public final class OutputPathAssetReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OutputPathAssetReference model = - BinaryData - .fromString("{\"referenceType\":\"OutputPath\",\"jobId\":\"h\",\"path\":\"mexznlwkb\"}") - .toObject(OutputPathAssetReference.class); - Assertions.assertEquals("h", model.jobId()); - Assertions.assertEquals("mexznlwkb", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OutputPathAssetReference model = new OutputPathAssetReference().withJobId("h").withPath("mexznlwkb"); - model = BinaryData.fromObject(model).toObject(OutputPathAssetReference.class); - Assertions.assertEquals("h", model.jobId()); - Assertions.assertEquals("mexznlwkb", model.path()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java deleted file mode 100644 index 547ba53df3c1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PaginatedComputeResourcesListTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ComputeResourceInner; -import com.azure.resourcemanager.machinelearning.models.Compute; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PaginatedComputeResourcesList; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PaginatedComputeResourcesListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PaginatedComputeResourcesList model = - BinaryData - .fromString( - "{\"value\":[{\"identity\":{\"principalId\":\"6e82368f-483c-407c-b3d6-2d64ef6e71aa\",\"tenantId\":\"821c3424-4690-42c4-a22b-b51baca687f1\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"unmmq\",\"tags\":{\"ocukoklyax\":\"xzko\"},\"sku\":{\"name\":\"onuq\",\"tier\":\"Basic\",\"size\":\"beypewrmjmw\",\"family\":\"jektcxsenh\",\"capacity\":2036309182},\"properties\":{\"computeType\":\"Compute\",\"computeLocation\":\"rzpwvlqdqgbiq\",\"provisioningState\":\"Deleting\",\"description\":\"kaet\",\"createdOn\":\"2021-03-20T05:01:22Z\",\"modifiedOn\":\"2021-02-19T02:27:03Z\",\"resourceId\":\"ivfsnk\",\"provisioningErrors\":[],\"isAttachedCompute\":false,\"disableLocalAuth\":false},\"id\":\"hjfbebrjcxe\",\"name\":\"fuwutttxf\",\"type\":\"jrbirphxepcyv\"}],\"nextLink\":\"fnljky\"}") - .toObject(PaginatedComputeResourcesList.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("unmmq", model.value().get(0).location()); - Assertions.assertEquals("xzko", model.value().get(0).tags().get("ocukoklyax")); - Assertions.assertEquals("onuq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).sku().size()); - Assertions.assertEquals("jektcxsenh", model.value().get(0).sku().family()); - Assertions.assertEquals(2036309182, model.value().get(0).sku().capacity()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.value().get(0).properties().computeLocation()); - Assertions.assertEquals("kaet", model.value().get(0).properties().description()); - Assertions.assertEquals("ivfsnk", model.value().get(0).properties().resourceId()); - Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth()); - Assertions.assertEquals("fnljky", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PaginatedComputeResourcesList model = - new PaginatedComputeResourcesList() - .withValue( - Arrays - .asList( - new ComputeResourceInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("unmmq") - .withTags(mapOf("ocukoklyax", "xzko")) - .withSku( - new Sku() - .withName("onuq") - .withTier(SkuTier.BASIC) - .withSize("beypewrmjmw") - .withFamily("jektcxsenh") - .withCapacity(2036309182)) - .withProperties( - new Compute() - .withComputeLocation("rzpwvlqdqgbiq") - .withDescription("kaet") - .withResourceId("ivfsnk") - .withDisableLocalAuth(false)))) - .withNextLink("fnljky"); - model = BinaryData.fromObject(model).toObject(PaginatedComputeResourcesList.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("unmmq", model.value().get(0).location()); - Assertions.assertEquals("xzko", model.value().get(0).tags().get("ocukoklyax")); - Assertions.assertEquals("onuq", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("beypewrmjmw", model.value().get(0).sku().size()); - Assertions.assertEquals("jektcxsenh", model.value().get(0).sku().family()); - Assertions.assertEquals(2036309182, model.value().get(0).sku().capacity()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.value().get(0).properties().computeLocation()); - Assertions.assertEquals("kaet", model.value().get(0).properties().description()); - Assertions.assertEquals("ivfsnk", model.value().get(0).properties().resourceId()); - Assertions.assertEquals(false, model.value().get(0).properties().disableLocalAuth()); - Assertions.assertEquals("fnljky", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java deleted file mode 100644 index c4a98b0fb36c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentPartialMinimalTrackedResourceWithPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"frvtpuqu\"},\"tags\":{\"doaon\":\"lgkfbt\",\"ed\":\"bjcntujitc\"}}") - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("frvtpuqu", model.properties().description()); - Assertions.assertEquals("lgkfbt", model.tags().get("doaon")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties model = - new PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties() - .withProperties(new PartialBatchDeployment().withDescription("frvtpuqu")) - .withTags(mapOf("doaon", "lgkfbt", "ed", "bjcntujitc")); - model = - BinaryData - .fromObject(model) - .toObject(PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties.class); - Assertions.assertEquals("frvtpuqu", model.properties().description()); - Assertions.assertEquals("lgkfbt", model.tags().get("doaon")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java deleted file mode 100644 index bc27fbcb7618..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialBatchDeploymentTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialBatchDeployment; -import org.junit.jupiter.api.Assertions; - -public final class PartialBatchDeploymentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialBatchDeployment model = - BinaryData.fromString("{\"description\":\"wwa\"}").toObject(PartialBatchDeployment.class); - Assertions.assertEquals("wwa", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialBatchDeployment model = new PartialBatchDeployment().withDescription("wwa"); - model = BinaryData.fromObject(model).toObject(PartialBatchDeployment.class); - Assertions.assertEquals("wwa", model.description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java deleted file mode 100644 index 939e861d2bb5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialManagedServiceIdentityTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialManagedServiceIdentity model = - BinaryData - .fromString("{\"type\":\"None\",\"userAssignedIdentities\":{\"dtmhrkwofyyvoqa\":\"dataibahwflus\"}}") - .toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialManagedServiceIdentity model = - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("dtmhrkwofyyvoqa", "dataibahwflus")); - model = BinaryData.fromObject(model).toObject(PartialManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java deleted file mode 100644 index 7c2893c3737b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResource model = - BinaryData - .fromString("{\"tags\":{\"wbwo\":\"expbtg\",\"kcnqxwbpo\":\"nwashrtd\",\"aasipqi\":\"ulpiuj\"}}") - .toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("expbtg", model.tags().get("wbwo")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResource model = - new PartialMinimalTrackedResource() - .withTags(mapOf("wbwo", "expbtg", "kcnqxwbpo", "nwashrtd", "aasipqi", "ulpiuj")); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResource.class); - Assertions.assertEquals("expbtg", model.tags().get("wbwo")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java deleted file mode 100644 index 6c42e362c03d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithIdentityTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PartialManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model = - BinaryData - .fromString( - "{\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"opkwhojv\":\"datamg\",\"mocmbqfqvmk\":\"dataajqgxy\",\"helxprglya\":\"dataxozap\"}},\"tags\":{\"uejrjxgc\":\"ckcb\",\"i\":\"qibrhosxsdqrhzoy\"}}") - .toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("ckcb", model.tags().get("uejrjxgc")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithIdentity model = - new PartialMinimalTrackedResourceWithIdentity() - .withTags(mapOf("uejrjxgc", "ckcb", "i", "qibrhosxsdqrhzoy")) - .withIdentity( - new PartialManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf("opkwhojv", "datamg", "mocmbqfqvmk", "dataajqgxy", "helxprglya", "dataxozap"))); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithIdentity.class); - Assertions.assertEquals("ckcb", model.tags().get("uejrjxgc")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java deleted file mode 100644 index dfc67b508652..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialMinimalTrackedResourceWithSkuTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialMinimalTrackedResourceWithSku; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PartialMinimalTrackedResourceWithSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialMinimalTrackedResourceWithSku model = - BinaryData - .fromString( - "{\"sku\":{\"capacity\":1978421071,\"family\":\"noamldsehaohdj\",\"name\":\"flzokxco\",\"size\":\"e\",\"tier\":\"Premium\"},\"tags\":{\"ftgz\":\"agltsxoa\"}}") - .toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("agltsxoa", model.tags().get("ftgz")); - Assertions.assertEquals(1978421071, model.sku().capacity()); - Assertions.assertEquals("noamldsehaohdj", model.sku().family()); - Assertions.assertEquals("flzokxco", model.sku().name()); - Assertions.assertEquals("e", model.sku().size()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialMinimalTrackedResourceWithSku model = - new PartialMinimalTrackedResourceWithSku() - .withTags(mapOf("ftgz", "agltsxoa")) - .withSku( - new PartialSku() - .withCapacity(1978421071) - .withFamily("noamldsehaohdj") - .withName("flzokxco") - .withSize("e") - .withTier(SkuTier.PREMIUM)); - model = BinaryData.fromObject(model).toObject(PartialMinimalTrackedResourceWithSku.class); - Assertions.assertEquals("agltsxoa", model.tags().get("ftgz")); - Assertions.assertEquals(1978421071, model.sku().capacity()); - Assertions.assertEquals("noamldsehaohdj", model.sku().family()); - Assertions.assertEquals("flzokxco", model.sku().name()); - Assertions.assertEquals("e", model.sku().size()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java deleted file mode 100644 index 14f1c95632e0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PartialSkuTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PartialSku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class PartialSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PartialSku model = - BinaryData - .fromString( - "{\"capacity\":1425632159,\"family\":\"swvefloccsrmoz\",\"name\":\"m\",\"size\":\"g\",\"tier\":\"Free\"}") - .toObject(PartialSku.class); - Assertions.assertEquals(1425632159, model.capacity()); - Assertions.assertEquals("swvefloccsrmoz", model.family()); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("g", model.size()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PartialSku model = - new PartialSku() - .withCapacity(1425632159) - .withFamily("swvefloccsrmoz") - .withName("m") - .withSize("g") - .withTier(SkuTier.FREE); - model = BinaryData.fromObject(model).toObject(PartialSku.class); - Assertions.assertEquals(1425632159, model.capacity()); - Assertions.assertEquals("swvefloccsrmoz", model.family()); - Assertions.assertEquals("m", model.name()); - Assertions.assertEquals("g", model.size()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java deleted file mode 100644 index 71ac532ecdcb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PasswordTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Password; - -public final class PasswordTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Password model = - BinaryData.fromString("{\"name\":\"pgvdf\",\"value\":\"otkftutqxlngx\"}").toObject(Password.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Password model = new Password(); - model = BinaryData.fromObject(model).toObject(Password.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java deleted file mode 100644 index ecc30fc06103..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PersonalComputeInstanceSettingsTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AssignedUser; -import com.azure.resourcemanager.machinelearning.models.PersonalComputeInstanceSettings; -import org.junit.jupiter.api.Assertions; - -public final class PersonalComputeInstanceSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PersonalComputeInstanceSettings model = - BinaryData - .fromString("{\"assignedUser\":{\"objectId\":\"emc\",\"tenantId\":\"jk\"}}") - .toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("emc", model.assignedUser().objectId()); - Assertions.assertEquals("jk", model.assignedUser().tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PersonalComputeInstanceSettings model = - new PersonalComputeInstanceSettings() - .withAssignedUser(new AssignedUser().withObjectId("emc").withTenantId("jk")); - model = BinaryData.fromObject(model).toObject(PersonalComputeInstanceSettings.class); - Assertions.assertEquals("emc", model.assignedUser().objectId()); - Assertions.assertEquals("jk", model.assignedUser().tenantId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java deleted file mode 100644 index 9e4a3e6734b4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PipelineJobTests.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.IdentityConfiguration; -import com.azure.resourcemanager.machinelearning.models.JobInput; -import com.azure.resourcemanager.machinelearning.models.JobOutput; -import com.azure.resourcemanager.machinelearning.models.JobService; -import com.azure.resourcemanager.machinelearning.models.PipelineJob; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PipelineJobTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PipelineJob model = - BinaryData - .fromString( - "{\"jobType\":\"Pipeline\",\"inputs\":{\"erufgjblcdrmy\":{\"jobInputType\":\"JobInput\",\"description\":\"khup\"},\"lugekdfqnhtt\":{\"jobInputType\":\"JobInput\",\"description\":\"emftzgyyky\"},\"kmhmnulwempdc\":{\"jobInputType\":\"JobInput\",\"description\":\"owrczfjjnnuxxr\"},\"sulwzpflusn\":{\"jobInputType\":\"JobInput\",\"description\":\"rhjul\"}},\"jobs\":{\"iyrgkoek\":\"datahhgzotf\"},\"outputs\":{\"pcqydeykvsk\":{\"jobOutputType\":\"JobOutput\",\"description\":\"xyxhighctxbxmo\"},\"boohxbms\":{\"jobOutputType\":\"JobOutput\",\"description\":\"zdfrjeizikgq\"},\"qaeo\":{\"jobOutputType\":\"JobOutput\",\"description\":\"cqsxrmdvewu\"}},\"settings\":\"datajh\",\"sourceJobId\":\"jkbvhhdaurgho\",\"componentId\":\"aexbkhxjxjo\",\"computeId\":\"lqxr\",\"displayName\":\"knkob\",\"experimentName\":\"tmbozomtzamicbig\",\"identity\":{\"identityType\":\"IdentityConfiguration\"},\"isArchived\":true,\"services\":{\"sotirei\":{\"endpoint\":\"znuxkeuairaabmdl\",\"errorMessage\":\"bedpfixlhupmomih\",\"jobServiceType\":\"dnpxpkcdpr\",\"port\":656606105,\"properties\":{\"ghflrufssjyghsf\":\"yi\",\"fgvqcpdw\":\"rkbhammgmqfm\",\"dcdjhunh\":\"gquxweysland\"},\"status\":\"cgawnrrnquo\"}},\"status\":\"Finalizing\",\"description\":\"bfsx\",\"properties\":{\"mxcjzlquzexokjx\":\"yilbvz\"},\"tags\":{\"bwmvogljsvl\":\"vbzinz\",\"nwcehaqidoyzl\":\"gi\",\"pepiaeapfs\":\"giomqo\",\"pqqncju\":\"rgdtpeqnacyheqw\"}}") - .toObject(PipelineJob.class); - Assertions.assertEquals("bfsx", model.description()); - Assertions.assertEquals("yilbvz", model.properties().get("mxcjzlquzexokjx")); - Assertions.assertEquals("vbzinz", model.tags().get("bwmvogljsvl")); - Assertions.assertEquals("aexbkhxjxjo", model.componentId()); - Assertions.assertEquals("lqxr", model.computeId()); - Assertions.assertEquals("knkob", model.displayName()); - Assertions.assertEquals("tmbozomtzamicbig", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("znuxkeuairaabmdl", model.services().get("sotirei").endpoint()); - Assertions.assertEquals("dnpxpkcdpr", model.services().get("sotirei").jobServiceType()); - Assertions.assertEquals(656606105, model.services().get("sotirei").port()); - Assertions.assertEquals("yi", model.services().get("sotirei").properties().get("ghflrufssjyghsf")); - Assertions.assertEquals("khup", model.inputs().get("erufgjblcdrmy").description()); - Assertions.assertEquals("xyxhighctxbxmo", model.outputs().get("pcqydeykvsk").description()); - Assertions.assertEquals("jkbvhhdaurgho", model.sourceJobId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PipelineJob model = - new PipelineJob() - .withDescription("bfsx") - .withProperties(mapOf("mxcjzlquzexokjx", "yilbvz")) - .withTags( - mapOf( - "bwmvogljsvl", - "vbzinz", - "nwcehaqidoyzl", - "gi", - "pepiaeapfs", - "giomqo", - "pqqncju", - "rgdtpeqnacyheqw")) - .withComponentId("aexbkhxjxjo") - .withComputeId("lqxr") - .withDisplayName("knkob") - .withExperimentName("tmbozomtzamicbig") - .withIdentity(new IdentityConfiguration()) - .withIsArchived(true) - .withServices( - mapOf( - "sotirei", - new JobService() - .withEndpoint("znuxkeuairaabmdl") - .withJobServiceType("dnpxpkcdpr") - .withPort(656606105) - .withProperties( - mapOf( - "ghflrufssjyghsf", "yi", "fgvqcpdw", "rkbhammgmqfm", "dcdjhunh", "gquxweysland")))) - .withInputs( - mapOf( - "erufgjblcdrmy", - new JobInput().withDescription("khup"), - "lugekdfqnhtt", - new JobInput().withDescription("emftzgyyky"), - "kmhmnulwempdc", - new JobInput().withDescription("owrczfjjnnuxxr"), - "sulwzpflusn", - new JobInput().withDescription("rhjul"))) - .withJobs(mapOf("iyrgkoek", "datahhgzotf")) - .withOutputs( - mapOf( - "pcqydeykvsk", - new JobOutput().withDescription("xyxhighctxbxmo"), - "boohxbms", - new JobOutput().withDescription("zdfrjeizikgq"), - "qaeo", - new JobOutput().withDescription("cqsxrmdvewu"))) - .withSettings("datajh") - .withSourceJobId("jkbvhhdaurgho"); - model = BinaryData.fromObject(model).toObject(PipelineJob.class); - Assertions.assertEquals("bfsx", model.description()); - Assertions.assertEquals("yilbvz", model.properties().get("mxcjzlquzexokjx")); - Assertions.assertEquals("vbzinz", model.tags().get("bwmvogljsvl")); - Assertions.assertEquals("aexbkhxjxjo", model.componentId()); - Assertions.assertEquals("lqxr", model.computeId()); - Assertions.assertEquals("knkob", model.displayName()); - Assertions.assertEquals("tmbozomtzamicbig", model.experimentName()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("znuxkeuairaabmdl", model.services().get("sotirei").endpoint()); - Assertions.assertEquals("dnpxpkcdpr", model.services().get("sotirei").jobServiceType()); - Assertions.assertEquals(656606105, model.services().get("sotirei").port()); - Assertions.assertEquals("yi", model.services().get("sotirei").properties().get("ghflrufssjyghsf")); - Assertions.assertEquals("khup", model.inputs().get("erufgjblcdrmy").description()); - Assertions.assertEquals("xyxhighctxbxmo", model.outputs().get("pcqydeykvsk").description()); - Assertions.assertEquals("jkbvhhdaurgho", model.sourceJobId()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index 6e4b39e897f0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionInnerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"pikxwczbyscnpqxu\",\"subnetArmId\":\"vyq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"ybrk\",\"actionsRequired\":\"dumjgrtfwvuk\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"ab4618d0-89cc-42a6-8af9-01fb81852cef\",\"tenantId\":\"33dab1a2-cc10-43fe-bcce-1e2e3342c542\",\"type\":\"None\",\"userAssignedIdentities\":{\"jcny\":{\"principalId\":\"73635982-b45d-422a-a162-47fa604aa819\",\"clientId\":\"cb770753-bd37-4dd1-b217-83ceefddad2d\"},\"kryhtnapczwlokj\":{\"principalId\":\"fb641d5f-adfd-43a0-bbd2-8d16389dbfff\",\"clientId\":\"f16c80f3-21be-4d6c-96a3-e663540b9fad\"},\"kkvnipjox\":{\"principalId\":\"15196c0f-16a1-4607-bd2c-7b17b17dcafa\",\"clientId\":\"3a992dc1-89b1-4e46-adcb-e1f376ec6fd6\"}}},\"location\":\"nchgej\",\"tags\":{\"ahuxinpm\":\"dmailzydehojw\",\"vcputegj\":\"njaqwixjspro\",\"uuvmkjozkrwfnd\":\"wmfdatscmdvpjhul\"},\"sku\":{\"name\":\"djpslw\",\"tier\":\"Premium\",\"size\":\"vwryoqpso\",\"family\":\"ctazakljlahbcryf\",\"capacity\":1389039399},\"id\":\"osygex\",\"name\":\"aojakhmsbzjhcrz\",\"type\":\"vdphlxaolthqtr\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("nchgej", model.location()); - Assertions.assertEquals("dmailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals("djpslw", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("vwryoqpso", model.sku().size()); - Assertions.assertEquals("ctazakljlahbcryf", model.sku().family()); - Assertions.assertEquals(1389039399, model.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ybrk", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dumjgrtfwvuk", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf( - "jcny", - new UserAssignedIdentity(), - "kryhtnapczwlokj", - new UserAssignedIdentity(), - "kkvnipjox", - new UserAssignedIdentity()))) - .withLocation("nchgej") - .withTags( - mapOf( - "ahuxinpm", "dmailzydehojw", "vcputegj", "njaqwixjspro", "uuvmkjozkrwfnd", "wmfdatscmdvpjhul")) - .withSku( - new Sku() - .withName("djpslw") - .withTier(SkuTier.PREMIUM) - .withSize("vwryoqpso") - .withFamily("ctazakljlahbcryf") - .withCapacity(1389039399)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) - .withDescription("ybrk") - .withActionsRequired("dumjgrtfwvuk")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.identity().type()); - Assertions.assertEquals("nchgej", model.location()); - Assertions.assertEquals("dmailzydehojw", model.tags().get("ahuxinpm")); - Assertions.assertEquals("djpslw", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("vwryoqpso", model.sku().size()); - Assertions.assertEquals("ctazakljlahbcryf", model.sku().family()); - Assertions.assertEquals(1389039399, model.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.APPROVED, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ybrk", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("dumjgrtfwvuk", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.java deleted file mode 100644 index 225154582dcf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionListResultTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnectionListResult; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"a16b0819-56bd-4218-8f63-1a6e43318690\",\"tenantId\":\"e99cad70-8299-4702-98fd-698d21448ff7\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"k\",\"tags\":{\"kphywpnvjto\":\"dhbt\"},\"sku\":{\"name\":\"ermclfplphoxuscr\",\"tier\":\"Basic\",\"size\":\"ye\",\"family\":\"bjtazqugxywpmu\",\"capacity\":737814385},\"id\":\"zwfqkqujidsuyon\",\"name\":\"bglaocqxtccm\",\"type\":\"yudxytlmoy\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"170fc112-1b20-4f58-819c-51041af9f532\",\"tenantId\":\"7ad71cc8-ee0b-4afa-8b0e-bab53c22c7f4\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"txhdzh\",\"tags\":{\"sbkyvpycanuzbp\":\"jbhckfrlhr\"},\"sku\":{\"name\":\"afkuwb\",\"tier\":\"Basic\",\"size\":\"bmehh\",\"family\":\"yvjusrtslhsp\",\"capacity\":1857421626},\"id\":\"maofmxagkv\",\"name\":\"melmqkrha\",\"type\":\"vljua\"},{\"properties\":{\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"7ee1c31e-ec49-456e-8ea8-78f4129f7b6f\",\"tenantId\":\"0b889b39-707f-4b57-839f-013c448bcd09\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"alaexqpvfadmwsrc\",\"tags\":{\"zlfmisgwbnbbeld\":\"xpvgo\",\"ali\":\"wkz\"},\"sku\":{\"name\":\"rqhakauha\",\"tier\":\"Standard\",\"size\":\"wxosowzxcug\",\"family\":\"jooxdjebw\",\"capacity\":741000017},\"id\":\"wfvovbv\",\"name\":\"euecivyhzceuoj\",\"type\":\"jrwjueiotwm\"},{\"properties\":{\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"f58ea4b5-f02e-496b-a143-d4e796072a44\",\"tenantId\":\"ccb2ecc9-f620-4ad9-9e68-75414abeb40c\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"location\":\"rjaw\",\"tags\":{\"fbkp\":\"gxhnisk\",\"lwn\":\"cg\"},\"sku\":{\"name\":\"hjdauwhvylwz\",\"tier\":\"Standard\",\"size\":\"xujznbmpowu\",\"family\":\"rzqlveu\",\"capacity\":1056372950},\"id\":\"j\",\"name\":\"khfxobbcswsrt\",\"type\":\"riplrbpbewtg\"}]}") - .toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("dhbt", model.value().get(0).tags().get("kphywpnvjto")); - Assertions.assertEquals("ermclfplphoxuscr", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("ye", model.value().get(0).sku().size()); - Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).sku().family()); - Assertions.assertEquals(737814385, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionListResult model = - new PrivateEndpointConnectionListResult() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("k") - .withTags(mapOf("kphywpnvjto", "dhbt")) - .withSku( - new Sku() - .withName("ermclfplphoxuscr") - .withTier(SkuTier.BASIC) - .withSize("ye") - .withFamily("bjtazqugxywpmu") - .withCapacity(737814385)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("txhdzh") - .withTags(mapOf("sbkyvpycanuzbp", "jbhckfrlhr")) - .withSku( - new Sku() - .withName("afkuwb") - .withTier(SkuTier.BASIC) - .withSize("bmehh") - .withFamily("yvjusrtslhsp") - .withCapacity(1857421626)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("alaexqpvfadmwsrc") - .withTags(mapOf("zlfmisgwbnbbeld", "xpvgo", "ali", "wkz")) - .withSku( - new Sku() - .withName("rqhakauha") - .withTier(SkuTier.STANDARD) - .withSize("wxosowzxcug") - .withFamily("jooxdjebw") - .withCapacity(741000017)), - new PrivateEndpointConnectionInner() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("rjaw") - .withTags(mapOf("fbkp", "gxhnisk", "lwn", "cg")) - .withSku( - new Sku() - .withName("hjdauwhvylwz") - .withTier(SkuTier.STANDARD) - .withSize("xujznbmpowu") - .withFamily("rzqlveu") - .withCapacity(1056372950)))); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionListResult.class); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("k", model.value().get(0).location()); - Assertions.assertEquals("dhbt", model.value().get(0).tags().get("kphywpnvjto")); - Assertions.assertEquals("ermclfplphoxuscr", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.value().get(0).sku().tier()); - Assertions.assertEquals("ye", model.value().get(0).sku().size()); - Assertions.assertEquals("bjtazqugxywpmu", model.value().get(0).sku().family()); - Assertions.assertEquals(737814385, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 2c41aa44579b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"bpf\",\"subnetArmId\":\"s\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"v\",\"actionsRequired\":\"jrwzox\"},\"provisioningState\":\"Creating\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrwzox", model.privateLinkServiceConnectionState().actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING) - .withDescription("v") - .withActionsRequired("jrwzox")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.PENDING, model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("v", model.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("jrwzox", model.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 6ce45394fe2b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"k\",\"subnetArmId\":\"zkdtzxsoed\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"li\",\"actionsRequired\":\"zomucmqgisnionet\"},\"provisioningState\":\"Succeeded\"},\"identity\":{\"principalId\":\"6990e6f7-106a-433c-997d-a718208f7ce7\",\"tenantId\":\"38771c9c-5b53-4d64-924e-98d9bc7791cc\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"kgtlzl\",\"tags\":{\"zkbnbmxl\":\"lxcznn\",\"g\":\"mwt\",\"ahfsgb\":\"qzusitoq\"},\"sku\":{\"name\":\"lreesrfwsszvlcwl\",\"tier\":\"Basic\",\"size\":\"ntfxxcrqmipfjwfo\",\"family\":\"izmshxxba\",\"capacity\":1165412558},\"id\":\"ulnvgskj\",\"name\":\"o\",\"type\":\"jdzjsjzn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("dpwrp") - .withExistingWorkspace("ycpawm", "jp") - .withRegion("qp") - .withTags(mapOf("qgcnbhcbmjk", "zihqod", "n", "ti")) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withSku( - new Sku() - .withName("ntsxjmfmeftvh") - .withTier(SkuTier.FREE) - .withSize("gjrhs") - .withFamily("w") - .withCapacity(2051010260)) - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) - .withDescription("eyam") - .withActionsRequired("idmdiawpzxkzrntm")) - .create(); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("kgtlzl", response.location()); - Assertions.assertEquals("lxcznn", response.tags().get("zkbnbmxl")); - Assertions.assertEquals("lreesrfwsszvlcwl", response.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, response.sku().tier()); - Assertions.assertEquals("ntfxxcrqmipfjwfo", response.sku().size()); - Assertions.assertEquals("izmshxxba", response.sku().family()); - Assertions.assertEquals(1165412558, response.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("li", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zomucmqgisnionet", response.privateLinkServiceConnectionState().actionsRequired()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index 65d4a6a1878a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .privateEndpointConnections() - .deleteWithResponse("yuqh", "lmcskyk", "fuofixcnpcfykkp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 92b171c50ec4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"wzlzklasl\",\"subnetArmId\":\"ciz\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"arwp\",\"actionsRequired\":\"saudoejtighsx\"},\"provisioningState\":\"Creating\"},\"identity\":{\"principalId\":\"77a4ccdb-fb26-4f04-884f-577353706d15\",\"tenantId\":\"82e5dd6c-ed00-424d-b9d3-56306a3b5e26\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"ahovuuw\",\"tags\":{\"jnhj\":\"e\",\"fbbcngkegxcypxbb\":\"oti\",\"qlf\":\"etwilyrzoxpd\"},\"sku\":{\"name\":\"lqownkiua\",\"tier\":\"Free\",\"size\":\"ahwkxjjm\",\"family\":\"nlmsoo\",\"capacity\":1046371938},\"id\":\"ecdh\",\"name\":\"yswcrptveajczx\",\"type\":\"lgsrgkrfizrpywlp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("bkbdhlltqstqkqs", "gxiynecovagzk", "eubanlxunpqcc", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("ahovuuw", response.location()); - Assertions.assertEquals("e", response.tags().get("jnhj")); - Assertions.assertEquals("lqownkiua", response.sku().name()); - Assertions.assertEquals(SkuTier.FREE, response.sku().tier()); - Assertions.assertEquals("ahwkxjjm", response.sku().size()); - Assertions.assertEquals("nlmsoo", response.sku().family()); - Assertions.assertEquals(1046371938, response.sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("arwp", response.privateLinkServiceConnectionState().description()); - Assertions.assertEquals("saudoejtighsx", response.privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 499e64fc382e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointConnection; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"m\",\"subnetArmId\":\"wrjlvzkl\"},\"privateLinkServiceConnectionState\":{\"status\":\"Timeout\",\"description\":\"ikyjtkakvlb\",\"actionsRequired\":\"hjvpzaptu\"},\"provisioningState\":\"Deleting\"},\"identity\":{\"principalId\":\"a1ace026-f3aa-406c-8a65-a498830c671a\",\"tenantId\":\"c3c04e1d-18fa-479e-90c4-b10480fc598c\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"wfgcdiykkcxwn\",\"tags\":{\"qohhihra\":\"qynvavitmdm\",\"rhlhpvzadbwenni\":\"quddrwjclj\",\"viqlluk\":\"afhxrzfrmvztiuc\"},\"sku\":{\"name\":\"rcqxgcbvzarmqc\",\"tier\":\"Premium\",\"size\":\"stsinvag\",\"family\":\"jyhdrxb\",\"capacity\":1587779031},\"id\":\"ehqwhitxnmxgn\",\"name\":\"guzbuw\",\"type\":\"orbalkj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().list("ti", "zkaugpucdocfqpl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("wfgcdiykkcxwn", response.iterator().next().location()); - Assertions.assertEquals("qynvavitmdm", response.iterator().next().tags().get("qohhihra")); - Assertions.assertEquals("rcqxgcbvzarmqc", response.iterator().next().sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, response.iterator().next().sku().tier()); - Assertions.assertEquals("stsinvag", response.iterator().next().sku().size()); - Assertions.assertEquals("jyhdrxb", response.iterator().next().sku().family()); - Assertions.assertEquals(1587779031, response.iterator().next().sku().capacity()); - Assertions - .assertEquals( - PrivateEndpointServiceConnectionStatus.TIMEOUT, - response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("ikyjtkakvlb", response.iterator().next().privateLinkServiceConnectionState().description()); - Assertions - .assertEquals( - "hjvpzaptu", response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java deleted file mode 100644 index aa276bedb610..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = - BinaryData.fromString("{\"id\":\"elluwfziton\",\"subnetArmId\":\"qfpjk\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java deleted file mode 100644 index 5ac2e0598114..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceListResultInnerTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceListResultInner; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"c\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"7350756a-3e63-4658-9b36-a4c2e5f3a6d9\",\"tenantId\":\"02570bb2-e352-4d93-9bd1-d3451723dd5b\",\"type\":\"None\",\"userAssignedIdentities\":{}},\"location\":\"jkbegibtnmxiebww\",\"tags\":{\"tzjuzgwyzmhtxo\":\"ayqcgw\",\"nftguvriuhpr\":\"gmtsavjcbpwxqpsr\"},\"sku\":{\"name\":\"dyvxqtayriww\",\"tier\":\"Premium\",\"size\":\"bexrmcq\",\"family\":\"ycnojvknmefqsg\",\"capacity\":488274582},\"id\":\"apj\",\"name\":\"zhpvgqzcjrvxd\",\"type\":\"zlmwlxkvugfhz\"},{\"properties\":{\"groupId\":\"wjvzunluthnn\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"6cd9bb2d-0450-4976-a3e0-e2008cd6e042\",\"tenantId\":\"9dd771d6-e628-44bb-a9c6-f9185d3fbc61\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"pjzu\",\"tags\":{\"kzbbtd\":\"xdult\",\"bsjyofdx\":\"umveekgpwozuhkf\",\"oekqvk\":\"uusdttouwa\",\"vbxwyjsflhh\":\"lns\"},\"sku\":{\"name\":\"aln\",\"tier\":\"Premium\",\"size\":\"sxyawjoyaqcs\",\"family\":\"jpkiidzyexznelix\",\"capacity\":705550222},\"id\":\"tfolhbnx\",\"name\":\"nalaulppg\",\"type\":\"dtpnapnyiropuhp\"},{\"properties\":{\"groupId\":\"pgylg\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"identity\":{\"principalId\":\"87b8d495-467b-4407-881f-0443f65da17d\",\"tenantId\":\"79df8e42-2e01-42d2-92af-39e2c1627e59\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"location\":\"v\",\"tags\":{\"rmgucnap\":\"ynqwwncwzzhxgk\",\"oellwp\":\"t\",\"qrhhu\":\"fdygpfqbuaceopz\"},\"sku\":{\"name\":\"pppcqeqxo\",\"tier\":\"Standard\",\"size\":\"hzxct\",\"family\":\"gbkdmoizpos\",\"capacity\":1176728044},\"id\":\"cfbu\",\"name\":\"rmfqjhhkxbpvj\",\"type\":\"mjh\"}]}") - .toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("jkbegibtnmxiebww", model.value().get(0).location()); - Assertions.assertEquals("ayqcgw", model.value().get(0).tags().get("tzjuzgwyzmhtxo")); - Assertions.assertEquals("dyvxqtayriww", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("bexrmcq", model.value().get(0).sku().size()); - Assertions.assertEquals("ycnojvknmefqsg", model.value().get(0).sku().family()); - Assertions.assertEquals(488274582, model.value().get(0).sku().capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResultInner model = - new PrivateLinkResourceListResultInner() - .withValue( - Arrays - .asList( - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withLocation("jkbegibtnmxiebww") - .withTags(mapOf("tzjuzgwyzmhtxo", "ayqcgw", "nftguvriuhpr", "gmtsavjcbpwxqpsr")) - .withSku( - new Sku() - .withName("dyvxqtayriww") - .withTier(SkuTier.PREMIUM) - .withSize("bexrmcq") - .withFamily("ycnojvknmefqsg") - .withCapacity(488274582)) - .withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("pjzu") - .withTags( - mapOf( - "kzbbtd", - "xdult", - "bsjyofdx", - "umveekgpwozuhkf", - "oekqvk", - "uusdttouwa", - "vbxwyjsflhh", - "lns")) - .withSku( - new Sku() - .withName("aln") - .withTier(SkuTier.PREMIUM) - .withSize("sxyawjoyaqcs") - .withFamily("jpkiidzyexznelix") - .withCapacity(705550222)) - .withRequiredZoneNames(Arrays.asList()), - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withLocation("v") - .withTags( - mapOf("rmgucnap", "ynqwwncwzzhxgk", "oellwp", "t", "qrhhu", "fdygpfqbuaceopz")) - .withSku( - new Sku() - .withName("pppcqeqxo") - .withTier(SkuTier.STANDARD) - .withSize("hzxct") - .withFamily("gbkdmoizpos") - .withCapacity(1176728044)) - .withRequiredZoneNames(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResultInner.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("jkbegibtnmxiebww", model.value().get(0).location()); - Assertions.assertEquals("ayqcgw", model.value().get(0).tags().get("tzjuzgwyzmhtxo")); - Assertions.assertEquals("dyvxqtayriww", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.value().get(0).sku().tier()); - Assertions.assertEquals("bexrmcq", model.value().get(0).sku().size()); - Assertions.assertEquals("ycnojvknmefqsg", model.value().get(0).sku().family()); - Assertions.assertEquals(488274582, model.value().get(0).sku().capacity()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index 2a47ff859696..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.PrivateLinkResourceProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"ifthnz\",\"requiredMembers\":[\"sl\",\"nayqi\",\"ynduha\",\"hqlkthumaqo\"],\"requiredZoneNames\":[\"ycduier\",\"gccymvaolpssl\"]}") - .toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ycduier", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = - new PrivateLinkResourceProperties().withRequiredZoneNames(Arrays.asList("ycduier", "gccymvaolpssl")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - Assertions.assertEquals("ycduier", model.requiredZoneNames().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java deleted file mode 100644 index b69f2148738b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourceTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResource; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResource model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"yngudivk\",\"requiredMembers\":[\"wbxqzvszjfau\",\"j\"],\"requiredZoneNames\":[\"xivetvt\",\"qaqtdoqmcbxvwvxy\"]},\"identity\":{\"principalId\":\"5fc3592b-d219-44be-b65a-2e2b3de76d9f\",\"tenantId\":\"712bd8ad-1151-45f2-bf61-d3e7de7dee99\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"blytk\":{\"principalId\":\"a95d1cdd-f7ed-4f87-a472-8a4bf616620d\",\"clientId\":\"f6f8621d-afad-499a-badb-6ecb26a9f3bb\"},\"pe\":{\"principalId\":\"fca7d1ee-b91d-42ac-9117-8d0ab41ca837\",\"clientId\":\"02cc4e93-4a44-44b6-a4b9-9f73d769c0c8\"},\"fbkrvrnsvs\":{\"principalId\":\"6434654b-4b63-4930-a988-6c07d2c784db\",\"clientId\":\"52f29274-c586-42d1-b67f-e1d18d5fb113\"}}},\"location\":\"johxcrsb\",\"tags\":{\"wbhsqfsub\":\"asrru\",\"rxbpyb\":\"gjb\",\"twss\":\"rfbjf\"},\"sku\":{\"name\":\"ftpvjzbexil\",\"tier\":\"Basic\",\"size\":\"qqnvwpmq\",\"family\":\"ruoujmk\",\"capacity\":1426920839},\"id\":\"qytjrybnwjewgd\",\"name\":\"jervnaenqpehi\",\"type\":\"doy\"}") - .toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("johxcrsb", model.location()); - Assertions.assertEquals("asrru", model.tags().get("wbhsqfsub")); - Assertions.assertEquals("ftpvjzbexil", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("qqnvwpmq", model.sku().size()); - Assertions.assertEquals("ruoujmk", model.sku().family()); - Assertions.assertEquals(1426920839, model.sku().capacity()); - Assertions.assertEquals("xivetvt", model.requiredZoneNames().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResource model = - new PrivateLinkResource() - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "blytk", - new UserAssignedIdentity(), - "pe", - new UserAssignedIdentity(), - "fbkrvrnsvs", - new UserAssignedIdentity()))) - .withLocation("johxcrsb") - .withTags(mapOf("wbhsqfsub", "asrru", "rxbpyb", "gjb", "twss", "rfbjf")) - .withSku( - new Sku() - .withName("ftpvjzbexil") - .withTier(SkuTier.BASIC) - .withSize("qqnvwpmq") - .withFamily("ruoujmk") - .withCapacity(1426920839)) - .withRequiredZoneNames(Arrays.asList("xivetvt", "qaqtdoqmcbxvwvxy")); - model = BinaryData.fromObject(model).toObject(PrivateLinkResource.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("johxcrsb", model.location()); - Assertions.assertEquals("asrru", model.tags().get("wbhsqfsub")); - Assertions.assertEquals("ftpvjzbexil", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - Assertions.assertEquals("qqnvwpmq", model.sku().size()); - Assertions.assertEquals("ruoujmk", model.sku().family()); - Assertions.assertEquals(1426920839, model.sku().capacity()); - Assertions.assertEquals("xivetvt", model.requiredZoneNames().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.java deleted file mode 100644 index 8cd519e98294..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkResourcesListWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkResourceListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"c\",\"tags\":{\"m\":\"fshksnyzmspamwb\",\"qdktwtkvihlp\":\"nlslcef\",\"zhwv\":\"liwoyngu\"},\"id\":\"p\",\"name\":\"mhjhaus\",\"type\":\"b\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResourceListResult response = - manager - .privateLinkResources() - .listWithResponse("hxqqmqip", "y", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("c", response.value().get(0).location()); - Assertions.assertEquals("fshksnyzmspamwb", response.value().get(0).tags().get("m")); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 49d48777e440..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString( - "{\"status\":\"Disconnected\",\"description\":\"fpdvhpfxxypi\",\"actionsRequired\":\"nmayhuybb\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("fpdvhpfxxypi", model.description()); - Assertions.assertEquals("nmayhuybb", model.actionsRequired()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState() - .withStatus(PrivateEndpointServiceConnectionStatus.DISCONNECTED) - .withDescription("fpdvhpfxxypi") - .withActionsRequired("nmayhuybb"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.DISCONNECTED, model.status()); - Assertions.assertEquals("fpdvhpfxxypi", model.description()); - Assertions.assertEquals("nmayhuybb", model.actionsRequired()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java deleted file mode 100644 index a2503cf5c9cb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ProbeSettingsTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ProbeSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ProbeSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ProbeSettings model = - BinaryData - .fromString( - "{\"failureThreshold\":1906628483,\"initialDelay\":\"PT113H32M27S\",\"period\":\"PT148H10M\",\"successThreshold\":619019093,\"timeout\":\"PT78H24M37S\"}") - .toObject(ProbeSettings.class); - Assertions.assertEquals(1906628483, model.failureThreshold()); - Assertions.assertEquals(Duration.parse("PT113H32M27S"), model.initialDelay()); - Assertions.assertEquals(Duration.parse("PT148H10M"), model.period()); - Assertions.assertEquals(619019093, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT78H24M37S"), model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ProbeSettings model = - new ProbeSettings() - .withFailureThreshold(1906628483) - .withInitialDelay(Duration.parse("PT113H32M27S")) - .withPeriod(Duration.parse("PT148H10M")) - .withSuccessThreshold(619019093) - .withTimeout(Duration.parse("PT78H24M37S")); - model = BinaryData.fromObject(model).toObject(ProbeSettings.class); - Assertions.assertEquals(1906628483, model.failureThreshold()); - Assertions.assertEquals(Duration.parse("PT113H32M27S"), model.initialDelay()); - Assertions.assertEquals(Duration.parse("PT148H10M"), model.period()); - Assertions.assertEquals(619019093, model.successThreshold()); - Assertions.assertEquals(Duration.parse("PT78H24M37S"), model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java deleted file mode 100644 index 4400de400ecd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/PyTorchTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PyTorch; -import org.junit.jupiter.api.Assertions; - -public final class PyTorchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PyTorch model = - BinaryData - .fromString("{\"distributionType\":\"PyTorch\",\"processCountPerInstance\":1314386445}") - .toObject(PyTorch.class); - Assertions.assertEquals(1314386445, model.processCountPerInstance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PyTorch model = new PyTorch().withProcessCountPerInstance(1314386445); - model = BinaryData.fromObject(model).toObject(PyTorch.class); - Assertions.assertEquals(1314386445, model.processCountPerInstance()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java deleted file mode 100644 index a68e619c802b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaBasePropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import org.junit.jupiter.api.Assertions; - -public final class QuotaBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaBaseProperties model = - BinaryData - .fromString( - "{\"id\":\"ozmyzydagfu\",\"type\":\"bezy\",\"limit\":1156651479695546396,\"unit\":\"Count\"}") - .toObject(QuotaBaseProperties.class); - Assertions.assertEquals("ozmyzydagfu", model.id()); - Assertions.assertEquals("bezy", model.type()); - Assertions.assertEquals(1156651479695546396L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaBaseProperties model = - new QuotaBaseProperties() - .withId("ozmyzydagfu") - .withType("bezy") - .withLimit(1156651479695546396L) - .withUnit(QuotaUnit.COUNT); - model = BinaryData.fromObject(model).toObject(QuotaBaseProperties.class); - Assertions.assertEquals("ozmyzydagfu", model.id()); - Assertions.assertEquals("bezy", model.type()); - Assertions.assertEquals(1156651479695546396L, model.limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.unit()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java deleted file mode 100644 index cdd5e013b5a5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotaUpdateParametersTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class QuotaUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaUpdateParameters model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"oaeupfhyhltrpmo\",\"type\":\"mcmatuokthfuiu\",\"limit\":6209557393905029674,\"unit\":\"Count\"}],\"location\":\"kvxod\"}") - .toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("oaeupfhyhltrpmo", model.value().get(0).id()); - Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).type()); - Assertions.assertEquals(6209557393905029674L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("kvxod", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaUpdateParameters model = - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId("oaeupfhyhltrpmo") - .withType("mcmatuokthfuiu") - .withLimit(6209557393905029674L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("kvxod"); - model = BinaryData.fromObject(model).toObject(QuotaUpdateParameters.class); - Assertions.assertEquals("oaeupfhyhltrpmo", model.value().get(0).id()); - Assertions.assertEquals("mcmatuokthfuiu", model.value().get(0).type()); - Assertions.assertEquals(6209557393905029674L, model.value().get(0).limit()); - Assertions.assertEquals(QuotaUnit.COUNT, model.value().get(0).unit()); - Assertions.assertEquals("kvxod", model.location()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java deleted file mode 100644 index 64b726ec63d5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ResourceQuota; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class QuotasListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"txop\",\"amlWorkspaceLocation\":\"hpadkmdzg\",\"type\":\"zxvctkbbxuharls\",\"name\":{\"value\":\"ccla\",\"localizedValue\":\"oyn\"},\"limit\":3258721915949075156,\"unit\":\"Count\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.quotas().list("drhutfdo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java deleted file mode 100644 index 331408e61af2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/QuotasUpdateWithResponseMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.QuotaBaseProperties; -import com.azure.resourcemanager.machinelearning.models.QuotaUnit; -import com.azure.resourcemanager.machinelearning.models.QuotaUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotasResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class QuotasUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"ud\",\"type\":\"ckaprhknqiijge\",\"limit\":564973110703252614,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"qih\",\"type\":\"yowltj\",\"limit\":818494289048822861,\"unit\":\"Count\",\"status\":\"OperationNotEnabledForRegion\"},{\"id\":\"ieproqksmfxm\",\"type\":\"prstvkitbfj\",\"limit\":2706549674295489273,\"unit\":\"Count\",\"status\":\"Success\"}],\"nextLink\":\"acqoccqrqxwetj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - UpdateWorkspaceQuotasResult response = - manager - .quotas() - .updateWithResponse( - "aaneakhtmhobcya", - new QuotaUpdateParameters() - .withValue( - Arrays - .asList( - new QuotaBaseProperties() - .withId("qtvkh") - .withType("oog") - .withLimit(8839691341349880163L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId("qymhcctopuow") - .withType("nskby") - .withLimit(4791092419176992520L) - .withUnit(QuotaUnit.COUNT), - new QuotaBaseProperties() - .withId("gx") - .withType("ajpxecxqnwhscoza") - .withLimit(5738000548376016022L) - .withUnit(QuotaUnit.COUNT))) - .withLocation("pknpwirfljfewxq"), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java deleted file mode 100644 index fc93ee725ae1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RandomSamplingAlgorithmTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithm; -import com.azure.resourcemanager.machinelearning.models.RandomSamplingAlgorithmRule; -import org.junit.jupiter.api.Assertions; - -public final class RandomSamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RandomSamplingAlgorithm model = - BinaryData - .fromString("{\"samplingAlgorithmType\":\"Random\",\"rule\":\"Random\",\"seed\":1677252615}") - .toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - Assertions.assertEquals(1677252615, model.seed()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RandomSamplingAlgorithm model = - new RandomSamplingAlgorithm().withRule(RandomSamplingAlgorithmRule.RANDOM).withSeed(1677252615); - model = BinaryData.fromObject(model).toObject(RandomSamplingAlgorithm.class); - Assertions.assertEquals(RandomSamplingAlgorithmRule.RANDOM, model.rule()); - Assertions.assertEquals(1677252615, model.seed()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java deleted file mode 100644 index f20c15c87d6f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceScheduleTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceScheduleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceSchedule model = - BinaryData - .fromString( - "{\"hours\":[2030386405,1910653936,488610875,1439896312],\"minutes\":[1083020573],\"monthDays\":[1541422170,1378797079,254990993],\"weekDays\":[\"Friday\",\"Saturday\",\"Saturday\"]}") - .toObject(RecurrenceSchedule.class); - Assertions.assertEquals(2030386405, model.hours().get(0)); - Assertions.assertEquals(1083020573, model.minutes().get(0)); - Assertions.assertEquals(1541422170, model.monthDays().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceSchedule model = - new RecurrenceSchedule() - .withHours(Arrays.asList(2030386405, 1910653936, 488610875, 1439896312)) - .withMinutes(Arrays.asList(1083020573)) - .withMonthDays(Arrays.asList(1541422170, 1378797079, 254990993)) - .withWeekDays(Arrays.asList(WeekDay.FRIDAY, WeekDay.SATURDAY, WeekDay.SATURDAY)); - model = BinaryData.fromObject(model).toObject(RecurrenceSchedule.class); - Assertions.assertEquals(2030386405, model.hours().get(0)); - Assertions.assertEquals(1083020573, model.minutes().get(0)); - Assertions.assertEquals(1541422170, model.monthDays().get(0)); - Assertions.assertEquals(WeekDay.FRIDAY, model.weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java deleted file mode 100644 index f2509ff03af7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RecurrenceTriggerTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RecurrenceFrequency; -import com.azure.resourcemanager.machinelearning.models.RecurrenceSchedule; -import com.azure.resourcemanager.machinelearning.models.RecurrenceTrigger; -import com.azure.resourcemanager.machinelearning.models.WeekDay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecurrenceTriggerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecurrenceTrigger model = - BinaryData - .fromString( - "{\"triggerType\":\"Recurrence\",\"frequency\":\"Hour\",\"interval\":712298972,\"schedule\":{\"hours\":[2143245313,620966114],\"minutes\":[41999694,2076319922],\"monthDays\":[2043297749,1561277343,1217879659,986610623],\"weekDays\":[\"Wednesday\",\"Monday\"]},\"endTime\":\"rlktgjcsggu\",\"startTime\":\"eml\",\"timeZone\":\"waeeczgfb\"}") - .toObject(RecurrenceTrigger.class); - Assertions.assertEquals("rlktgjcsggu", model.endTime()); - Assertions.assertEquals("eml", model.startTime()); - Assertions.assertEquals("waeeczgfb", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.frequency()); - Assertions.assertEquals(712298972, model.interval()); - Assertions.assertEquals(2143245313, model.schedule().hours().get(0)); - Assertions.assertEquals(41999694, model.schedule().minutes().get(0)); - Assertions.assertEquals(2043297749, model.schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().weekDays().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecurrenceTrigger model = - new RecurrenceTrigger() - .withEndTime("rlktgjcsggu") - .withStartTime("eml") - .withTimeZone("waeeczgfb") - .withFrequency(RecurrenceFrequency.HOUR) - .withInterval(712298972) - .withSchedule( - new RecurrenceSchedule() - .withHours(Arrays.asList(2143245313, 620966114)) - .withMinutes(Arrays.asList(41999694, 2076319922)) - .withMonthDays(Arrays.asList(2043297749, 1561277343, 1217879659, 986610623)) - .withWeekDays(Arrays.asList(WeekDay.WEDNESDAY, WeekDay.MONDAY))); - model = BinaryData.fromObject(model).toObject(RecurrenceTrigger.class); - Assertions.assertEquals("rlktgjcsggu", model.endTime()); - Assertions.assertEquals("eml", model.startTime()); - Assertions.assertEquals("waeeczgfb", model.timeZone()); - Assertions.assertEquals(RecurrenceFrequency.HOUR, model.frequency()); - Assertions.assertEquals(712298972, model.interval()); - Assertions.assertEquals(2143245313, model.schedule().hours().get(0)); - Assertions.assertEquals(41999694, model.schedule().minutes().get(0)); - Assertions.assertEquals(2043297749, model.schedule().monthDays().get(0)); - Assertions.assertEquals(WeekDay.WEDNESDAY, model.schedule().weekDays().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.java deleted file mode 100644 index 4151764643b3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.Regression; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Regression model = - BinaryData - .fromString( - "{\"taskType\":\"Regression\",\"primaryMetric\":\"NormalizedRootMeanSquaredError\",\"trainingSettings\":{\"allowedTrainingAlgorithms\":[\"ElasticNet\"],\"blockedTrainingAlgorithms\":[\"ExtremeRandomTrees\",\"ElasticNet\"],\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":false,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT84H43M30S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datavsi\",\"stackMetaLearnerTrainPercentage\":29.842412252567886,\"stackMetaLearnerType\":\"LightGBMRegressor\"}},\"cvSplitColumnNames\":[\"zydisnuep\",\"wyj\",\"nldpxottd\"],\"featurizationSettings\":{\"blockedTransformers\":[\"CountVectorizer\",\"WoETargetEncoder\"],\"columnNameAndTypes\":{\"vcjwqwoqsratj\":\"zjihweebiphr\",\"jhfrzgdkkagv\":\"dhzybsp\"},\"enableDnnFeaturization\":true,\"mode\":\"Custom\",\"transformerParams\":{\"mo\":[]},\"datasetLanguage\":\"mzhwilzzhni\"},\"limitSettings\":{\"enableEarlyTermination\":true,\"exitScore\":3.9502204468192637,\"maxConcurrentTrials\":2133816848,\"maxCoresPerTrial\":444992966,\"maxTrials\":1238035913,\"timeout\":\"PT160H46M45S\",\"trialTimeout\":\"PT11H57M31S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"bkut\",\"description\":\"mltwjfluxynbpvzl\"},\"testDataSize\":9.59052197916832,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"njc\",\"description\":\"mocgjshg\"},\"validationDataSize\":1.3885888922809064,\"weightColumnName\":\"wvixq\",\"logVerbosity\":\"Error\",\"targetColumnName\":\"jkyb\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"clrvtzqnrbctbh\",\"description\":\"hxpcvrdnyeita\"}}") - .toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("jkyb", model.targetColumnName()); - Assertions.assertEquals("hxpcvrdnyeita", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("clrvtzqnrbctbh", model.trainingData().uri()); - Assertions.assertEquals(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT84H43M30S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 29.842412252567886D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals(RegressionModels.ELASTIC_NET, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals( - RegressionModels.EXTREME_RANDOM_TREES, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("zydisnuep", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mzhwilzzhni", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.COUNT_VECTORIZER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("zjihweebiphr", model.featurizationSettings().columnNameAndTypes().get("vcjwqwoqsratj")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(3.9502204468192637D, model.limitSettings().exitScore()); - Assertions.assertEquals(2133816848, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(444992966, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(1238035913, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT160H46M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT11H57M31S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("mltwjfluxynbpvzl", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals("bkut", model.testData().uri()); - Assertions.assertEquals(9.59052197916832D, model.testDataSize()); - Assertions.assertEquals("mocgjshg", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("njc", model.validationData().uri()); - Assertions.assertEquals(1.3885888922809064D, model.validationDataSize()); - Assertions.assertEquals("wvixq", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Regression model = - new Regression() - .withLogVerbosity(LogVerbosity.ERROR) - .withTargetColumnName("jkyb") - .withTrainingData( - new MLTableJobInput() - .withDescription("hxpcvrdnyeita") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("clrvtzqnrbctbh")) - .withPrimaryMetric(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR) - .withTrainingSettings( - new RegressionTrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(false) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT84H43M30S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datavsi") - .withStackMetaLearnerTrainPercentage(29.842412252567886D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.ELASTIC_NET)) - .withBlockedTrainingAlgorithms( - Arrays.asList(RegressionModels.EXTREME_RANDOM_TREES, RegressionModels.ELASTIC_NET))) - .withCvSplitColumnNames(Arrays.asList("zydisnuep", "wyj", "nldpxottd")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("mzhwilzzhni") - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.COUNT_VECTORIZER, BlockedTransformers.WO_ETARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("vcjwqwoqsratj", "zjihweebiphr", "jhfrzgdkkagv", "dhzybsp")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.CUSTOM) - .withTransformerParams(mapOf("mo", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(true) - .withExitScore(3.9502204468192637D) - .withMaxConcurrentTrials(2133816848) - .withMaxCoresPerTrial(444992966) - .withMaxTrials(1238035913) - .withTimeout(Duration.parse("PT160H46M45S")) - .withTrialTimeout(Duration.parse("PT11H57M31S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("mltwjfluxynbpvzl") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("bkut")) - .withTestDataSize(9.59052197916832D) - .withValidationData( - new MLTableJobInput() - .withDescription("mocgjshg") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("njc")) - .withValidationDataSize(1.3885888922809064D) - .withWeightColumnName("wvixq"); - model = BinaryData.fromObject(model).toObject(Regression.class); - Assertions.assertEquals(LogVerbosity.ERROR, model.logVerbosity()); - Assertions.assertEquals("jkyb", model.targetColumnName()); - Assertions.assertEquals("hxpcvrdnyeita", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("clrvtzqnrbctbh", model.trainingData().uri()); - Assertions.assertEquals(RegressionPrimaryMetrics.NORMALIZED_ROOT_MEAN_SQUARED_ERROR, model.primaryMetric()); - Assertions.assertEquals(false, model.trainingSettings().enableDnnTraining()); - Assertions.assertEquals(false, model.trainingSettings().enableModelExplainability()); - Assertions.assertEquals(false, model.trainingSettings().enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.trainingSettings().enableStackEnsemble()); - Assertions.assertEquals(false, model.trainingSettings().enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT84H43M30S"), model.trainingSettings().ensembleModelDownloadTimeout()); - Assertions - .assertEquals( - 29.842412252567886D, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, - model.trainingSettings().stackEnsembleSettings().stackMetaLearnerType()); - Assertions - .assertEquals(RegressionModels.ELASTIC_NET, model.trainingSettings().allowedTrainingAlgorithms().get(0)); - Assertions - .assertEquals( - RegressionModels.EXTREME_RANDOM_TREES, model.trainingSettings().blockedTrainingAlgorithms().get(0)); - Assertions.assertEquals("zydisnuep", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("mzhwilzzhni", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.COUNT_VECTORIZER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("zjihweebiphr", model.featurizationSettings().columnNameAndTypes().get("vcjwqwoqsratj")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.CUSTOM, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(3.9502204468192637D, model.limitSettings().exitScore()); - Assertions.assertEquals(2133816848, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(444992966, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(1238035913, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT160H46M45S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT11H57M31S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("mltwjfluxynbpvzl", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.testData().mode()); - Assertions.assertEquals("bkut", model.testData().uri()); - Assertions.assertEquals(9.59052197916832D, model.testDataSize()); - Assertions.assertEquals("mocgjshg", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.validationData().mode()); - Assertions.assertEquals("njc", model.validationData().uri()); - Assertions.assertEquals(1.3885888922809064D, model.validationDataSize()); - Assertions.assertEquals("wvixq", model.weightColumnName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java deleted file mode 100644 index 272e375c9c59..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RegressionTrainingSettingsTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.RegressionModels; -import com.azure.resourcemanager.machinelearning.models.RegressionTrainingSettings; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import java.time.Duration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RegressionTrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RegressionTrainingSettings model = - BinaryData - .fromString( - "{\"allowedTrainingAlgorithms\":[\"LightGBM\"],\"blockedTrainingAlgorithms\":[\"DecisionTree\"],\"enableDnnTraining\":true,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":true,\"enableVoteEnsemble\":true,\"ensembleModelDownloadTimeout\":\"PT173H34M23S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datakiceevsaaxwsp\",\"stackMetaLearnerTrainPercentage\":33.77569584333657,\"stackMetaLearnerType\":\"LightGBMRegressor\"}}") - .toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT173H34M23S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(33.77569584333657D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RegressionTrainingSettings model = - new RegressionTrainingSettings() - .withEnableDnnTraining(true) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(true) - .withEnableVoteEnsemble(true) - .withEnsembleModelDownloadTimeout(Duration.parse("PT173H34M23S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datakiceevsaaxwsp") - .withStackMetaLearnerTrainPercentage(33.77569584333657D) - .withStackMetaLearnerType(StackMetaLearnerType.LIGHT_GBMREGRESSOR)) - .withAllowedTrainingAlgorithms(Arrays.asList(RegressionModels.LIGHT_GBM)) - .withBlockedTrainingAlgorithms(Arrays.asList(RegressionModels.DECISION_TREE)); - model = BinaryData.fromObject(model).toObject(RegressionTrainingSettings.class); - Assertions.assertEquals(true, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(true, model.enableStackEnsemble()); - Assertions.assertEquals(true, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT173H34M23S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(33.77569584333657D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LIGHT_GBMREGRESSOR, model.stackEnsembleSettings().stackMetaLearnerType()); - Assertions.assertEquals(RegressionModels.LIGHT_GBM, model.allowedTrainingAlgorithms().get(0)); - Assertions.assertEquals(RegressionModels.DECISION_TREE, model.blockedTrainingAlgorithms().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java deleted file mode 100644 index 8057b8532d54..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceBaseTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceBase model = - BinaryData - .fromString( - "{\"description\":\"ss\",\"properties\":{\"uyowqkdwy\":\"twbdsrezpdrhn\"},\"tags\":{\"rcgp\":\"ib\",\"ejzanlfz\":\"kpzi\",\"zonokixrjqci\":\"iavrm\"}}") - .toObject(ResourceBase.class); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("twbdsrezpdrhn", model.properties().get("uyowqkdwy")); - Assertions.assertEquals("ib", model.tags().get("rcgp")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceBase model = - new ResourceBase() - .withDescription("ss") - .withProperties(mapOf("uyowqkdwy", "twbdsrezpdrhn")) - .withTags(mapOf("rcgp", "ib", "ejzanlfz", "kpzi", "zonokixrjqci", "iavrm")); - model = BinaryData.fromObject(model).toObject(ResourceBase.class); - Assertions.assertEquals("ss", model.description()); - Assertions.assertEquals("twbdsrezpdrhn", model.properties().get("uyowqkdwy")); - Assertions.assertEquals("ib", model.tags().get("rcgp")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java deleted file mode 100644 index c0c0860a0d4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceConfigurationTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceConfiguration; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ResourceConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceConfiguration model = - BinaryData - .fromString( - "{\"instanceCount\":1364369199,\"instanceType\":\"kgjubgdknnqvsazn\",\"properties\":{\"mkycgra\":\"dataorudsgsa\"}}") - .toObject(ResourceConfiguration.class); - Assertions.assertEquals(1364369199, model.instanceCount()); - Assertions.assertEquals("kgjubgdknnqvsazn", model.instanceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceConfiguration model = - new ResourceConfiguration() - .withInstanceCount(1364369199) - .withInstanceType("kgjubgdknnqvsazn") - .withProperties(mapOf("mkycgra", "dataorudsgsa")); - model = BinaryData.fromObject(model).toObject(ResourceConfiguration.class); - Assertions.assertEquals(1364369199, model.instanceCount()); - Assertions.assertEquals("kgjubgdknnqvsazn", model.instanceType()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java deleted file mode 100644 index fbe206f90716..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceIdTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceId; -import org.junit.jupiter.api.Assertions; - -public final class ResourceIdTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceId model = BinaryData.fromString("{\"id\":\"gwgcl\"}").toObject(ResourceId.class); - Assertions.assertEquals("gwgcl", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceId model = new ResourceId().withId("gwgcl"); - model = BinaryData.fromObject(model).toObject(ResourceId.class); - Assertions.assertEquals("gwgcl", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java deleted file mode 100644 index 8a124e6a5b09..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceNameTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ResourceName; - -public final class ResourceNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceName model = - BinaryData - .fromString("{\"value\":\"yqzrnkcqvyxlw\",\"localizedValue\":\"lsicohoqqnwv\"}") - .toObject(ResourceName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceName model = new ResourceName(); - model = BinaryData.fromObject(model).toObject(ResourceName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java deleted file mode 100644 index 55f5b24d6e2e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ResourceQuotaInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ResourceQuotaInner; - -public final class ResourceQuotaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceQuotaInner model = - BinaryData - .fromString( - "{\"id\":\"bkh\",\"amlWorkspaceLocation\":\"deyeamdphagalpbu\",\"type\":\"gipwhonowkg\",\"name\":{\"value\":\"ankixzbinjeput\",\"localizedValue\":\"rywn\"},\"limit\":4868014576917618697,\"unit\":\"Count\"}") - .toObject(ResourceQuotaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceQuotaInner model = new ResourceQuotaInner(); - model = BinaryData.fromObject(model).toObject(ResourceQuotaInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java deleted file mode 100644 index 89d8b35868a4..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/RouteTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Route; -import org.junit.jupiter.api.Assertions; - -public final class RouteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Route model = BinaryData.fromString("{\"path\":\"iykzkdncjdx\",\"port\":1933240221}").toObject(Route.class); - Assertions.assertEquals("iykzkdncjdx", model.path()); - Assertions.assertEquals(1933240221, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Route model = new Route().withPath("iykzkdncjdx").withPort(1933240221); - model = BinaryData.fromObject(model).toObject(Route.class); - Assertions.assertEquals("iykzkdncjdx", model.path()); - Assertions.assertEquals(1933240221, model.port()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java deleted file mode 100644 index d126766fe08c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SamplingAlgorithmTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SamplingAlgorithm; - -public final class SamplingAlgorithmTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SamplingAlgorithm model = - BinaryData - .fromString("{\"samplingAlgorithmType\":\"SamplingAlgorithm\"}") - .toObject(SamplingAlgorithm.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SamplingAlgorithm model = new SamplingAlgorithm(); - model = BinaryData.fromObject(model).toObject(SamplingAlgorithm.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java deleted file mode 100644 index 3dfb52853552..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsInformationTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import com.azure.resourcemanager.machinelearning.models.ScaleSettingsInformation; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsInformationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettingsInformation model = - BinaryData - .fromString( - "{\"scaleSettings\":{\"maxNodeCount\":2089644825,\"minNodeCount\":582953019,\"nodeIdleTimeBeforeScaleDown\":\"PT83H47M42S\"}}") - .toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(2089644825, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(582953019, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT83H47M42S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettingsInformation model = - new ScaleSettingsInformation() - .withScaleSettings( - new ScaleSettings() - .withMaxNodeCount(2089644825) - .withMinNodeCount(582953019) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT83H47M42S"))); - model = BinaryData.fromObject(model).toObject(ScaleSettingsInformation.class); - Assertions.assertEquals(2089644825, model.scaleSettings().maxNodeCount()); - Assertions.assertEquals(582953019, model.scaleSettings().minNodeCount()); - Assertions.assertEquals(Duration.parse("PT83H47M42S"), model.scaleSettings().nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java deleted file mode 100644 index dc8082b7e78f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScaleSettingsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScaleSettings model = - BinaryData - .fromString( - "{\"maxNodeCount\":978941807,\"minNodeCount\":1532421493,\"nodeIdleTimeBeforeScaleDown\":\"PT119H2M26S\"}") - .toObject(ScaleSettings.class); - Assertions.assertEquals(978941807, model.maxNodeCount()); - Assertions.assertEquals(1532421493, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT119H2M26S"), model.nodeIdleTimeBeforeScaleDown()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScaleSettings model = - new ScaleSettings() - .withMaxNodeCount(978941807) - .withMinNodeCount(1532421493) - .withNodeIdleTimeBeforeScaleDown(Duration.parse("PT119H2M26S")); - model = BinaryData.fromObject(model).toObject(ScaleSettings.class); - Assertions.assertEquals(978941807, model.maxNodeCount()); - Assertions.assertEquals(1532421493, model.minNodeCount()); - Assertions.assertEquals(Duration.parse("PT119H2M26S"), model.nodeIdleTimeBeforeScaleDown()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java deleted file mode 100644 index 025be761cf92..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleActionBaseTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; - -public final class ScheduleActionBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleActionBase model = - BinaryData.fromString("{\"actionType\":\"ScheduleActionBase\"}").toObject(ScheduleActionBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleActionBase model = new ScheduleActionBase(); - model = BinaryData.fromObject(model).toObject(ScheduleActionBase.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java deleted file mode 100644 index 6b09e4895f95..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleBaseTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProvisioningState; -import com.azure.resourcemanager.machinelearning.models.ScheduleStatus; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleBase model = - BinaryData - .fromString("{\"id\":\"piudeugfsxzecpa\",\"provisioningStatus\":\"Completed\",\"status\":\"Disabled\"}") - .toObject(ScheduleBase.class); - Assertions.assertEquals("piudeugfsxzecpa", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleBase model = - new ScheduleBase() - .withId("piudeugfsxzecpa") - .withProvisioningStatus(ScheduleProvisioningState.COMPLETED) - .withStatus(ScheduleStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(ScheduleBase.class); - Assertions.assertEquals("piudeugfsxzecpa", model.id()); - Assertions.assertEquals(ScheduleProvisioningState.COMPLETED, model.provisioningStatus()); - Assertions.assertEquals(ScheduleStatus.DISABLED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java deleted file mode 100644 index 9351a842ad4e..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleInnerTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleInner model = - BinaryData - .fromString( - "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"quvre\",\"isEnabled\":true,\"provisioningState\":\"Succeeded\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"vsujztczytqjtwh\",\"startTime\":\"unfprnjletlxs\",\"timeZone\":\"pddouifamowaziyn\"},\"description\":\"lqwzdvpiwhxqsz\",\"properties\":{\"m\":\"aajquhuxylrj\",\"kfkyjp\":\"ygjbmzyospspsh\",\"pssdfppyogtie\":\"sp\"},\"tags\":{\"munjdxvglnkvx\":\"tvczkcnyxr\",\"khpzvuqdflv\":\"xpaglqivbgkc\",\"xtiv\":\"niypfpubcpzg\",\"nidibgqjxg\":\"j\"}},\"id\":\"r\",\"name\":\"govfgpikqmhhaow\",\"type\":\"rmzvupo\"}") - .toObject(ScheduleInner.class); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.properties().description()); - Assertions.assertEquals("aajquhuxylrj", model.properties().properties().get("m")); - Assertions.assertEquals("tvczkcnyxr", model.properties().tags().get("munjdxvglnkvx")); - Assertions.assertEquals("quvre", model.properties().displayName()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vsujztczytqjtwh", model.properties().trigger().endTime()); - Assertions.assertEquals("unfprnjletlxs", model.properties().trigger().startTime()); - Assertions.assertEquals("pddouifamowaziyn", model.properties().trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleInner model = - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("lqwzdvpiwhxqsz") - .withProperties(mapOf("m", "aajquhuxylrj", "kfkyjp", "ygjbmzyospspsh", "pssdfppyogtie", "sp")) - .withTags( - mapOf( - "munjdxvglnkvx", - "tvczkcnyxr", - "khpzvuqdflv", - "xpaglqivbgkc", - "xtiv", - "niypfpubcpzg", - "nidibgqjxg", - "j")) - .withAction(new ScheduleActionBase()) - .withDisplayName("quvre") - .withIsEnabled(true) - .withTrigger( - new TriggerBase() - .withEndTime("vsujztczytqjtwh") - .withStartTime("unfprnjletlxs") - .withTimeZone("pddouifamowaziyn"))); - model = BinaryData.fromObject(model).toObject(ScheduleInner.class); - Assertions.assertEquals("lqwzdvpiwhxqsz", model.properties().description()); - Assertions.assertEquals("aajquhuxylrj", model.properties().properties().get("m")); - Assertions.assertEquals("tvczkcnyxr", model.properties().tags().get("munjdxvglnkvx")); - Assertions.assertEquals("quvre", model.properties().displayName()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vsujztczytqjtwh", model.properties().trigger().endTime()); - Assertions.assertEquals("unfprnjletlxs", model.properties().trigger().startTime()); - Assertions.assertEquals("pddouifamowaziyn", model.properties().trigger().timeZone()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java deleted file mode 100644 index bba0061655f3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulePropertiesTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SchedulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleProperties model = - BinaryData - .fromString( - "{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"zdfuydzvkfvxcnqm\",\"isEnabled\":false,\"provisioningState\":\"Creating\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"kmvkhl\",\"startTime\":\"dhbemzqkzszu\",\"timeZone\":\"wtglxx\"},\"description\":\"jfpgpicrmn\",\"properties\":{\"vpqcb\":\"gmqgjs\",\"s\":\"rmbodt\"},\"tags\":{\"xousxauzl\":\"vriibakclacjfr\",\"wohqfzizvu\":\"vsg\",\"vmribiat\":\"mmkjsvthnwpztek\"}}") - .toObject(ScheduleProperties.class); - Assertions.assertEquals("jfpgpicrmn", model.description()); - Assertions.assertEquals("gmqgjs", model.properties().get("vpqcb")); - Assertions.assertEquals("vriibakclacjfr", model.tags().get("xousxauzl")); - Assertions.assertEquals("zdfuydzvkfvxcnqm", model.displayName()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("kmvkhl", model.trigger().endTime()); - Assertions.assertEquals("dhbemzqkzszu", model.trigger().startTime()); - Assertions.assertEquals("wtglxx", model.trigger().timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleProperties model = - new ScheduleProperties() - .withDescription("jfpgpicrmn") - .withProperties(mapOf("vpqcb", "gmqgjs", "s", "rmbodt")) - .withTags(mapOf("xousxauzl", "vriibakclacjfr", "wohqfzizvu", "vsg", "vmribiat", "mmkjsvthnwpztek")) - .withAction(new ScheduleActionBase()) - .withDisplayName("zdfuydzvkfvxcnqm") - .withIsEnabled(false) - .withTrigger( - new TriggerBase().withEndTime("kmvkhl").withStartTime("dhbemzqkzszu").withTimeZone("wtglxx")); - model = BinaryData.fromObject(model).toObject(ScheduleProperties.class); - Assertions.assertEquals("jfpgpicrmn", model.description()); - Assertions.assertEquals("gmqgjs", model.properties().get("vpqcb")); - Assertions.assertEquals("vriibakclacjfr", model.tags().get("xousxauzl")); - Assertions.assertEquals("zdfuydzvkfvxcnqm", model.displayName()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("kmvkhl", model.trigger().endTime()); - Assertions.assertEquals("dhbemzqkzszu", model.trigger().startTime()); - Assertions.assertEquals("wtglxx", model.trigger().timeZone()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java deleted file mode 100644 index 3c9894e04bbb..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScheduleResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.ScheduleInner; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.ScheduleResourceArmPaginatedResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ScheduleResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScheduleResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"bmhyreeudz\",\"value\":[{\"properties\":{\"displayName\":\"pdqmjxlyyzglgouw\",\"isEnabled\":false,\"provisioningState\":\"Updating\",\"description\":\"uojqt\",\"properties\":{},\"tags\":{}},\"id\":\"kjeytunl\",\"name\":\"fjkwrusnkq\",\"type\":\"hsyrqunj\"},{\"properties\":{\"displayName\":\"denxau\",\"isEnabled\":true,\"provisioningState\":\"Creating\",\"description\":\"kifmjn\",\"properties\":{},\"tags\":{}},\"id\":\"qabpxuckpggqow\",\"name\":\"yirdhlisngwflqq\",\"type\":\"pizruwnpqxpxiw\"},{\"properties\":{\"displayName\":\"ngjsaasi\",\"isEnabled\":true,\"provisioningState\":\"Failed\",\"description\":\"jvkviirhgfgrws\",\"properties\":{},\"tags\":{}},\"id\":\"atzv\",\"name\":\"bglbyvict\",\"type\":\"tbrxkjz\"},{\"properties\":{\"displayName\":\"gxffmshkwf\",\"isEnabled\":false,\"provisioningState\":\"Creating\",\"description\":\"wopdbydpiz\",\"properties\":{},\"tags\":{}},\"id\":\"napxbiygnug\",\"name\":\"knfsmfcttuxuuyil\",\"type\":\"lq\"}]}") - .toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("bmhyreeudz", model.nextLink()); - Assertions.assertEquals("uojqt", model.value().get(0).properties().description()); - Assertions.assertEquals("pdqmjxlyyzglgouw", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScheduleResourceArmPaginatedResult model = - new ScheduleResourceArmPaginatedResult() - .withNextLink("bmhyreeudz") - .withValue( - Arrays - .asList( - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("uojqt") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("pdqmjxlyyzglgouw") - .withIsEnabled(false)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("kifmjn") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("denxau") - .withIsEnabled(true)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("jvkviirhgfgrws") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("ngjsaasi") - .withIsEnabled(true)), - new ScheduleInner() - .withProperties( - new ScheduleProperties() - .withDescription("wopdbydpiz") - .withProperties(mapOf()) - .withTags(mapOf()) - .withDisplayName("gxffmshkwf") - .withIsEnabled(false)))); - model = BinaryData.fromObject(model).toObject(ScheduleResourceArmPaginatedResult.class); - Assertions.assertEquals("bmhyreeudz", model.nextLink()); - Assertions.assertEquals("uojqt", model.value().get(0).properties().description()); - Assertions.assertEquals("pdqmjxlyyzglgouw", model.value().get(0).properties().displayName()); - Assertions.assertEquals(false, model.value().get(0).properties().isEnabled()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java deleted file mode 100644 index 4923d8a4a1d9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleActionBase; -import com.azure.resourcemanager.machinelearning.models.ScheduleProperties; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SchedulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"j\",\"isEnabled\":false,\"provisioningState\":\"Succeeded\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"nxqpwnikxkcajgrb\",\"startTime\":\"tsvgoocqs\",\"timeZone\":\"mzlpcx\"},\"description\":\"mhxxrqicfzfvwjd\",\"properties\":{\"dkjrzfwkyluobdx\":\"vpyeyoafinmpnqu\",\"p\":\"hqdcclcvqsr\"},\"tags\":{\"fxl\":\"cvwbz\",\"iywqnpfydrfbgcny\":\"ymfjxl\",\"styygjq\":\"byxmkhmqyncgaull\"}},\"id\":\"lmwqg\",\"name\":\"hmqmiwxzf\",\"type\":\"vzucqfgufjnb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager - .schedules() - .define("xaravwwuasnjeglh") - .withExistingWorkspace("zyq", "brnxhjtlxfikj") - .withProperties( - new ScheduleProperties() - .withDescription("fhjxsawo") - .withProperties(mapOf("qkmwzrdqyoybmrno", "ffhx", "qphkv", "ocjnzdaiovrbhr")) - .withTags(mapOf("yp", "adcrxyl", "iwhjdfrwpsshrmn", "tyzvelffohu", "ogkscxj", "cclpct")) - .withAction(new ScheduleActionBase()) - .withDisplayName("xbozpcjcnwjz") - .withIsEnabled(false) - .withTrigger(new TriggerBase().withEndTime("nw").withStartTime("svoqiza").withTimeZone("sdso"))) - .create(); - - Assertions.assertEquals("mhxxrqicfzfvwjd", response.properties().description()); - Assertions.assertEquals("vpyeyoafinmpnqu", response.properties().properties().get("dkjrzfwkyluobdx")); - Assertions.assertEquals("cvwbz", response.properties().tags().get("fxl")); - Assertions.assertEquals("j", response.properties().displayName()); - Assertions.assertEquals(false, response.properties().isEnabled()); - Assertions.assertEquals("nxqpwnikxkcajgrb", response.properties().trigger().endTime()); - Assertions.assertEquals("tsvgoocqs", response.properties().trigger().startTime()); - Assertions.assertEquals("mzlpcx", response.properties().trigger().timeZone()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java deleted file mode 100644 index 830834e918e3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SchedulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.schedules().delete("yuveoxmpz", "wahdrdvhaztkxbi", "zfgxmbry", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java deleted file mode 100644 index bd976d8ce7f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SchedulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"qwdr\",\"isEnabled\":true,\"provisioningState\":\"Canceled\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"glmrcokzze\",\"startTime\":\"kounzsiy\",\"timeZone\":\"uby\"},\"description\":\"popikzeb\",\"properties\":{\"czygpmgfjcu\":\"fywtkqowsdlk\",\"otuzbybwjmtftc\":\"ojhhylxdevfiyy\"},\"tags\":{\"aqpibjg\":\"nirupkqnst\",\"bmsennqfabqcama\":\"vswmehfxrtt\"}},\"id\":\"ctcxs\",\"name\":\"mbzdxmsyn\",\"type\":\"kdnnyufxuzms\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Schedule response = - manager.schedules().getWithResponse("mw", "bios", "qsykq", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("popikzeb", response.properties().description()); - Assertions.assertEquals("fywtkqowsdlk", response.properties().properties().get("czygpmgfjcu")); - Assertions.assertEquals("nirupkqnst", response.properties().tags().get("aqpibjg")); - Assertions.assertEquals("qwdr", response.properties().displayName()); - Assertions.assertEquals(true, response.properties().isEnabled()); - Assertions.assertEquals("glmrcokzze", response.properties().trigger().endTime()); - Assertions.assertEquals("kounzsiy", response.properties().trigger().startTime()); - Assertions.assertEquals("uby", response.properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java deleted file mode 100644 index 4d28e762a538..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SchedulesListMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Schedule; -import com.azure.resourcemanager.machinelearning.models.ScheduleListViewType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SchedulesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"action\":{\"actionType\":\"ScheduleActionBase\"},\"displayName\":\"ygnbknhjgclxaxwc\",\"isEnabled\":false,\"provisioningState\":\"Failed\",\"trigger\":{\"triggerType\":\"TriggerBase\",\"endTime\":\"dzkucszghdoaqip\",\"startTime\":\"xclfrs\",\"timeZone\":\"rnmuvwvpuofddtbf\"},\"description\":\"kjcnginxdvmaoyq\",\"properties\":{\"txoqxtdn\":\"gyxzmxynofxl\"},\"tags\":{\"nivdqtkyk\":\"sjirkrpskcjhmmof\"}},\"id\":\"xnlsf\",\"name\":\"nyscaccpt\",\"type\":\"zetxygxxiceecvj\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .schedules() - .list("jezbfsjwfczgl", "vbgukbs", "bw", ScheduleListViewType.ALL, com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kjcnginxdvmaoyq", response.iterator().next().properties().description()); - Assertions.assertEquals("gyxzmxynofxl", response.iterator().next().properties().properties().get("txoqxtdn")); - Assertions.assertEquals("sjirkrpskcjhmmof", response.iterator().next().properties().tags().get("nivdqtkyk")); - Assertions.assertEquals("ygnbknhjgclxaxwc", response.iterator().next().properties().displayName()); - Assertions.assertEquals(false, response.iterator().next().properties().isEnabled()); - Assertions.assertEquals("dzkucszghdoaqip", response.iterator().next().properties().trigger().endTime()); - Assertions.assertEquals("xclfrs", response.iterator().next().properties().trigger().startTime()); - Assertions.assertEquals("rnmuvwvpuofddtbf", response.iterator().next().properties().trigger().timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java deleted file mode 100644 index 6146bafa97fc..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptReferenceTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import org.junit.jupiter.api.Assertions; - -public final class ScriptReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptReference model = - BinaryData - .fromString( - "{\"scriptSource\":\"z\",\"scriptData\":\"blkujrllfojuidjp\",\"scriptArguments\":\"yjucejikzoeo\",\"timeout\":\"tzejetjklnt\"}") - .toObject(ScriptReference.class); - Assertions.assertEquals("z", model.scriptSource()); - Assertions.assertEquals("blkujrllfojuidjp", model.scriptData()); - Assertions.assertEquals("yjucejikzoeo", model.scriptArguments()); - Assertions.assertEquals("tzejetjklnt", model.timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptReference model = - new ScriptReference() - .withScriptSource("z") - .withScriptData("blkujrllfojuidjp") - .withScriptArguments("yjucejikzoeo") - .withTimeout("tzejetjklnt"); - model = BinaryData.fromObject(model).toObject(ScriptReference.class); - Assertions.assertEquals("z", model.scriptSource()); - Assertions.assertEquals("blkujrllfojuidjp", model.scriptData()); - Assertions.assertEquals("yjucejikzoeo", model.scriptArguments()); - Assertions.assertEquals("tzejetjklnt", model.timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java deleted file mode 100644 index 73a18add9a8a..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ScriptsToExecuteTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import org.junit.jupiter.api.Assertions; - -public final class ScriptsToExecuteTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ScriptsToExecute model = - BinaryData - .fromString( - "{\"startupScript\":{\"scriptSource\":\"rvkmjcwmjvlgfggc\",\"scriptData\":\"yylizrz\",\"scriptArguments\":\"psfxsf\",\"timeout\":\"tl\"},\"creationScript\":{\"scriptSource\":\"vagbwidqlvhukove\",\"scriptData\":\"i\",\"scriptArguments\":\"vjfn\",\"timeout\":\"mvl\"}}") - .toObject(ScriptsToExecute.class); - Assertions.assertEquals("rvkmjcwmjvlgfggc", model.startupScript().scriptSource()); - Assertions.assertEquals("yylizrz", model.startupScript().scriptData()); - Assertions.assertEquals("psfxsf", model.startupScript().scriptArguments()); - Assertions.assertEquals("tl", model.startupScript().timeout()); - Assertions.assertEquals("vagbwidqlvhukove", model.creationScript().scriptSource()); - Assertions.assertEquals("i", model.creationScript().scriptData()); - Assertions.assertEquals("vjfn", model.creationScript().scriptArguments()); - Assertions.assertEquals("mvl", model.creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ScriptsToExecute model = - new ScriptsToExecute() - .withStartupScript( - new ScriptReference() - .withScriptSource("rvkmjcwmjvlgfggc") - .withScriptData("yylizrz") - .withScriptArguments("psfxsf") - .withTimeout("tl")) - .withCreationScript( - new ScriptReference() - .withScriptSource("vagbwidqlvhukove") - .withScriptData("i") - .withScriptArguments("vjfn") - .withTimeout("mvl")); - model = BinaryData.fromObject(model).toObject(ScriptsToExecute.class); - Assertions.assertEquals("rvkmjcwmjvlgfggc", model.startupScript().scriptSource()); - Assertions.assertEquals("yylizrz", model.startupScript().scriptData()); - Assertions.assertEquals("psfxsf", model.startupScript().scriptArguments()); - Assertions.assertEquals("tl", model.startupScript().timeout()); - Assertions.assertEquals("vagbwidqlvhukove", model.creationScript().scriptSource()); - Assertions.assertEquals("i", model.creationScript().scriptData()); - Assertions.assertEquals("vjfn", model.creationScript().scriptArguments()); - Assertions.assertEquals("mvl", model.creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java deleted file mode 100644 index 93d8e50a1bf8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SeasonalityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Seasonality; - -public final class SeasonalityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Seasonality model = BinaryData.fromString("{\"mode\":\"Seasonality\"}").toObject(Seasonality.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Seasonality model = new Seasonality(); - model = BinaryData.fromObject(model).toObject(Seasonality.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java deleted file mode 100644 index a89f03acf4af..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/ServiceManagedResourcesSettingsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import org.junit.jupiter.api.Assertions; - -public final class ServiceManagedResourcesSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceManagedResourcesSettings model = - BinaryData - .fromString("{\"cosmosDb\":{\"collectionsThroughput\":775754231}}") - .toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceManagedResourcesSettings model = - new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(775754231)); - model = BinaryData.fromObject(model).toObject(ServiceManagedResourcesSettings.class); - Assertions.assertEquals(775754231, model.cosmosDb().collectionsThroughput()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java deleted file mode 100644 index 1cf13f62bed6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SetupScriptsTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ScriptReference; -import com.azure.resourcemanager.machinelearning.models.ScriptsToExecute; -import com.azure.resourcemanager.machinelearning.models.SetupScripts; -import org.junit.jupiter.api.Assertions; - -public final class SetupScriptsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SetupScripts model = - BinaryData - .fromString( - "{\"scripts\":{\"startupScript\":{\"scriptSource\":\"otjewlpxuzzjgnre\",\"scriptData\":\"yhqotoihiqakydi\",\"scriptArguments\":\"brkwpzdqt\",\"timeout\":\"cspodaqax\"},\"creationScript\":{\"scriptSource\":\"ietgbebjfu\",\"scriptData\":\"moichdlpnfpubntn\",\"scriptArguments\":\"tzviqsowsaaelcat\",\"timeout\":\"ju\"}}}") - .toObject(SetupScripts.class); - Assertions.assertEquals("otjewlpxuzzjgnre", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("yhqotoihiqakydi", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("brkwpzdqt", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("cspodaqax", model.scripts().startupScript().timeout()); - Assertions.assertEquals("ietgbebjfu", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("moichdlpnfpubntn", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("tzviqsowsaaelcat", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("ju", model.scripts().creationScript().timeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SetupScripts model = - new SetupScripts() - .withScripts( - new ScriptsToExecute() - .withStartupScript( - new ScriptReference() - .withScriptSource("otjewlpxuzzjgnre") - .withScriptData("yhqotoihiqakydi") - .withScriptArguments("brkwpzdqt") - .withTimeout("cspodaqax")) - .withCreationScript( - new ScriptReference() - .withScriptSource("ietgbebjfu") - .withScriptData("moichdlpnfpubntn") - .withScriptArguments("tzviqsowsaaelcat") - .withTimeout("ju"))); - model = BinaryData.fromObject(model).toObject(SetupScripts.class); - Assertions.assertEquals("otjewlpxuzzjgnre", model.scripts().startupScript().scriptSource()); - Assertions.assertEquals("yhqotoihiqakydi", model.scripts().startupScript().scriptData()); - Assertions.assertEquals("brkwpzdqt", model.scripts().startupScript().scriptArguments()); - Assertions.assertEquals("cspodaqax", model.scripts().startupScript().timeout()); - Assertions.assertEquals("ietgbebjfu", model.scripts().creationScript().scriptSource()); - Assertions.assertEquals("moichdlpnfpubntn", model.scripts().creationScript().scriptData()); - Assertions.assertEquals("tzviqsowsaaelcat", model.scripts().creationScript().scriptArguments()); - Assertions.assertEquals("ju", model.scripts().creationScript().timeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java deleted file mode 100644 index 42cf41eef25f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourcePropertyTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SharedPrivateLinkResourceProperty; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourcePropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResourceProperty model = - BinaryData - .fromString( - "{\"privateLinkResourceId\":\"s\",\"groupId\":\"smjqulngsntnbyb\",\"requestMessage\":\"gc\",\"status\":\"Approved\"}") - .toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("s", model.privateLinkResourceId()); - Assertions.assertEquals("smjqulngsntnbyb", model.groupId()); - Assertions.assertEquals("gc", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResourceProperty model = - new SharedPrivateLinkResourceProperty() - .withPrivateLinkResourceId("s") - .withGroupId("smjqulngsntnbyb") - .withRequestMessage("gc") - .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperty.class); - Assertions.assertEquals("s", model.privateLinkResourceId()); - Assertions.assertEquals("smjqulngsntnbyb", model.groupId()); - Assertions.assertEquals("gc", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java deleted file mode 100644 index 30813b7dfc77..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SharedPrivateLinkResourceTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.PrivateEndpointServiceConnectionStatus; -import com.azure.resourcemanager.machinelearning.models.SharedPrivateLinkResource; -import org.junit.jupiter.api.Assertions; - -public final class SharedPrivateLinkResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SharedPrivateLinkResource model = - BinaryData - .fromString( - "{\"name\":\"bwjzr\",\"properties\":{\"privateLinkResourceId\":\"gxg\",\"groupId\":\"pemvtzfkufubljof\",\"requestMessage\":\"eofjaeqjh\",\"status\":\"Pending\"}}") - .toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("bwjzr", model.name()); - Assertions.assertEquals("gxg", model.privateLinkResourceId()); - Assertions.assertEquals("pemvtzfkufubljof", model.groupId()); - Assertions.assertEquals("eofjaeqjh", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SharedPrivateLinkResource model = - new SharedPrivateLinkResource() - .withName("bwjzr") - .withPrivateLinkResourceId("gxg") - .withGroupId("pemvtzfkufubljof") - .withRequestMessage("eofjaeqjh") - .withStatus(PrivateEndpointServiceConnectionStatus.PENDING); - model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResource.class); - Assertions.assertEquals("bwjzr", model.name()); - Assertions.assertEquals("gxg", model.privateLinkResourceId()); - Assertions.assertEquals("pemvtzfkufubljof", model.groupId()); - Assertions.assertEquals("eofjaeqjh", model.requestMessage()); - Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java deleted file mode 100644 index 28a064043258..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuCapacityTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import org.junit.jupiter.api.Assertions; - -public final class SkuCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuCapacity model = - BinaryData - .fromString( - "{\"default\":179999920,\"maximum\":2087309055,\"minimum\":498585791,\"scaleType\":\"Automatic\"}") - .toObject(SkuCapacity.class); - Assertions.assertEquals(179999920, model.defaultProperty()); - Assertions.assertEquals(2087309055, model.maximum()); - Assertions.assertEquals(498585791, model.minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuCapacity model = - new SkuCapacity() - .withDefaultProperty(179999920) - .withMaximum(2087309055) - .withMinimum(498585791) - .withScaleType(SkuScaleType.AUTOMATIC); - model = BinaryData.fromObject(model).toObject(SkuCapacity.class); - Assertions.assertEquals(179999920, model.defaultProperty()); - Assertions.assertEquals(2087309055, model.maximum()); - Assertions.assertEquals(498585791, model.minimum()); - Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java deleted file mode 100644 index 66d1afb25b4f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuResourceArmPaginatedResult; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"nextLink\":\"rmcaykgg\",\"value\":[{\"capacity\":{\"default\":167940342,\"maximum\":1720310055,\"minimum\":150393165,\"scaleType\":\"Manual\"},\"resourceType\":\"d\",\"sku\":{\"name\":\"pfnznthjtwkj\",\"tier\":\"Standard\"}}]}") - .toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("rmcaykgg", model.nextLink()); - Assertions.assertEquals(167940342, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(1720310055, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(150393165, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceArmPaginatedResult model = - new SkuResourceArmPaginatedResult() - .withNextLink("rmcaykgg") - .withValue( - Arrays - .asList( - new SkuResourceInner() - .withCapacity( - new SkuCapacity() - .withDefaultProperty(167940342) - .withMaximum(1720310055) - .withMinimum(150393165) - .withScaleType(SkuScaleType.MANUAL)) - .withSku(new SkuSetting().withName("pfnznthjtwkj").withTier(SkuTier.STANDARD)))); - model = BinaryData.fromObject(model).toObject(SkuResourceArmPaginatedResult.class); - Assertions.assertEquals("rmcaykgg", model.nextLink()); - Assertions.assertEquals(167940342, model.value().get(0).capacity().defaultProperty()); - Assertions.assertEquals(1720310055, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(150393165, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals("pfnznthjtwkj", model.value().get(0).sku().name()); - Assertions.assertEquals(SkuTier.STANDARD, model.value().get(0).sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java deleted file mode 100644 index c49c4c71bae5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuResourceInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.SkuResourceInner; -import com.azure.resourcemanager.machinelearning.models.SkuCapacity; -import com.azure.resourcemanager.machinelearning.models.SkuScaleType; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuResourceInner model = - BinaryData - .fromString( - "{\"capacity\":{\"default\":1475743122,\"maximum\":1335142199,\"minimum\":1634012333,\"scaleType\":\"Manual\"},\"resourceType\":\"cqiosmgbza\",\"sku\":{\"name\":\"xqdlyrtltlapr\",\"tier\":\"Basic\"}}") - .toObject(SkuResourceInner.class); - Assertions.assertEquals(1475743122, model.capacity().defaultProperty()); - Assertions.assertEquals(1335142199, model.capacity().maximum()); - Assertions.assertEquals(1634012333, model.capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals("xqdlyrtltlapr", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuResourceInner model = - new SkuResourceInner() - .withCapacity( - new SkuCapacity() - .withDefaultProperty(1475743122) - .withMaximum(1335142199) - .withMinimum(1634012333) - .withScaleType(SkuScaleType.MANUAL)) - .withSku(new SkuSetting().withName("xqdlyrtltlapr").withTier(SkuTier.BASIC)); - model = BinaryData.fromObject(model).toObject(SkuResourceInner.class); - Assertions.assertEquals(1475743122, model.capacity().defaultProperty()); - Assertions.assertEquals(1335142199, model.capacity().maximum()); - Assertions.assertEquals(1634012333, model.capacity().minimum()); - Assertions.assertEquals(SkuScaleType.MANUAL, model.capacity().scaleType()); - Assertions.assertEquals("xqdlyrtltlapr", model.sku().name()); - Assertions.assertEquals(SkuTier.BASIC, model.sku().tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java deleted file mode 100644 index 069d89339005..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuSettingTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SkuSetting; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuSettingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuSetting model = - BinaryData.fromString("{\"name\":\"nnbsoqeqa\",\"tier\":\"Premium\"}").toObject(SkuSetting.class); - Assertions.assertEquals("nnbsoqeqa", model.name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuSetting model = new SkuSetting().withName("nnbsoqeqa").withTier(SkuTier.PREMIUM); - model = BinaryData.fromObject(model).toObject(SkuSetting.class); - Assertions.assertEquals("nnbsoqeqa", model.name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.tier()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java deleted file mode 100644 index 5f25125dfac7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SkuTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString( - "{\"name\":\"narxzxtheotus\",\"tier\":\"Free\",\"size\":\"v\",\"family\":\"iqihn\",\"capacity\":1574404612}") - .toObject(Sku.class); - Assertions.assertEquals("narxzxtheotus", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("v", model.size()); - Assertions.assertEquals("iqihn", model.family()); - Assertions.assertEquals(1574404612, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = - new Sku() - .withName("narxzxtheotus") - .withTier(SkuTier.FREE) - .withSize("v") - .withFamily("iqihn") - .withCapacity(1574404612); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("narxzxtheotus", model.name()); - Assertions.assertEquals(SkuTier.FREE, model.tier()); - Assertions.assertEquals("v", model.size()); - Assertions.assertEquals("iqihn", model.family()); - Assertions.assertEquals(1574404612, model.capacity()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java deleted file mode 100644 index 3a87f545b8ce..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/StackEnsembleSettingsTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import org.junit.jupiter.api.Assertions; - -public final class StackEnsembleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - StackEnsembleSettings model = - BinaryData - .fromString( - "{\"stackMetaLearnerKWargs\":\"datandlqvtwknvgmmbu\",\"stackMetaLearnerTrainPercentage\":7.642157888085865,\"stackMetaLearnerType\":\"LogisticRegression\"}") - .toObject(StackEnsembleSettings.class); - Assertions.assertEquals(7.642157888085865D, model.stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackMetaLearnerType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - StackEnsembleSettings model = - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datandlqvtwknvgmmbu") - .withStackMetaLearnerTrainPercentage(7.642157888085865D) - .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION); - model = BinaryData.fromObject(model).toObject(StackEnsembleSettings.class); - Assertions.assertEquals(7.642157888085865D, model.stackMetaLearnerTrainPercentage()); - Assertions.assertEquals(StackMetaLearnerType.LOGISTIC_REGRESSION, model.stackMetaLearnerType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java deleted file mode 100644 index b1cd5557ce14..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SweepJobLimitsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SweepJobLimits; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class SweepJobLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SweepJobLimits model = - BinaryData - .fromString( - "{\"jobLimitsType\":\"Sweep\",\"maxConcurrentTrials\":1289892692,\"maxTotalTrials\":1229317362,\"trialTimeout\":\"PT17H24M34S\",\"timeout\":\"PT94H24M1S\"}") - .toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT94H24M1S"), model.timeout()); - Assertions.assertEquals(1289892692, model.maxConcurrentTrials()); - Assertions.assertEquals(1229317362, model.maxTotalTrials()); - Assertions.assertEquals(Duration.parse("PT17H24M34S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SweepJobLimits model = - new SweepJobLimits() - .withTimeout(Duration.parse("PT94H24M1S")) - .withMaxConcurrentTrials(1289892692) - .withMaxTotalTrials(1229317362) - .withTrialTimeout(Duration.parse("PT17H24M34S")); - model = BinaryData.fromObject(model).toObject(SweepJobLimits.class); - Assertions.assertEquals(Duration.parse("PT94H24M1S"), model.timeout()); - Assertions.assertEquals(1289892692, model.maxConcurrentTrials()); - Assertions.assertEquals(1229317362, model.maxTotalTrials()); - Assertions.assertEquals(Duration.parse("PT17H24M34S"), model.trialTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java deleted file mode 100644 index ac5066baa849..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkPropertiesTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties; -import org.junit.jupiter.api.Assertions; - -public final class SynapseSparkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SynapseSparkProperties model = - BinaryData - .fromString( - "{\"autoScaleProperties\":{\"minNodeCount\":1954145446,\"enabled\":true,\"maxNodeCount\":1674537674},\"autoPauseProperties\":{\"delayInMinutes\":1052407004,\"enabled\":true},\"sparkVersion\":\"ojpslsvjgpliufi\",\"nodeCount\":1125182676,\"nodeSize\":\"xqvapcohh\",\"nodeSizeFamily\":\"cqpqojxcxzrzdc\",\"subscriptionId\":\"zbenribc\",\"resourceGroup\":\"etzqd\",\"workspaceName\":\"jwfljhznamtua\",\"poolName\":\"zwcjjncqtj\"}") - .toObject(SynapseSparkProperties.class); - Assertions.assertEquals(1954145446, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1674537674, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1052407004, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.autoPauseProperties().enabled()); - Assertions.assertEquals("ojpslsvjgpliufi", model.sparkVersion()); - Assertions.assertEquals(1125182676, model.nodeCount()); - Assertions.assertEquals("xqvapcohh", model.nodeSize()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.nodeSizeFamily()); - Assertions.assertEquals("zbenribc", model.subscriptionId()); - Assertions.assertEquals("etzqd", model.resourceGroup()); - Assertions.assertEquals("jwfljhznamtua", model.workspaceName()); - Assertions.assertEquals("zwcjjncqtj", model.poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSparkProperties model = - new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties() - .withMinNodeCount(1954145446) - .withEnabled(true) - .withMaxNodeCount(1674537674)) - .withAutoPauseProperties(new AutoPauseProperties().withDelayInMinutes(1052407004).withEnabled(true)) - .withSparkVersion("ojpslsvjgpliufi") - .withNodeCount(1125182676) - .withNodeSize("xqvapcohh") - .withNodeSizeFamily("cqpqojxcxzrzdc") - .withSubscriptionId("zbenribc") - .withResourceGroup("etzqd") - .withWorkspaceName("jwfljhznamtua") - .withPoolName("zwcjjncqtj"); - model = BinaryData.fromObject(model).toObject(SynapseSparkProperties.class); - Assertions.assertEquals(1954145446, model.autoScaleProperties().minNodeCount()); - Assertions.assertEquals(true, model.autoScaleProperties().enabled()); - Assertions.assertEquals(1674537674, model.autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(1052407004, model.autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.autoPauseProperties().enabled()); - Assertions.assertEquals("ojpslsvjgpliufi", model.sparkVersion()); - Assertions.assertEquals(1125182676, model.nodeCount()); - Assertions.assertEquals("xqvapcohh", model.nodeSize()); - Assertions.assertEquals("cqpqojxcxzrzdc", model.nodeSizeFamily()); - Assertions.assertEquals("zbenribc", model.subscriptionId()); - Assertions.assertEquals("etzqd", model.resourceGroup()); - Assertions.assertEquals("jwfljhznamtua", model.workspaceName()); - Assertions.assertEquals("zwcjjncqtj", model.poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java deleted file mode 100644 index 35050793a9b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SynapseSparkTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.AutoPauseProperties; -import com.azure.resourcemanager.machinelearning.models.AutoScaleProperties; -import com.azure.resourcemanager.machinelearning.models.SynapseSpark; -import com.azure.resourcemanager.machinelearning.models.SynapseSparkProperties; -import org.junit.jupiter.api.Assertions; - -public final class SynapseSparkTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SynapseSpark model = - BinaryData - .fromString( - "{\"computeType\":\"SynapseSpark\",\"properties\":{\"autoScaleProperties\":{\"minNodeCount\":1214736566,\"enabled\":false,\"maxNodeCount\":576028683},\"autoPauseProperties\":{\"delayInMinutes\":909175637,\"enabled\":true},\"sparkVersion\":\"pedbwdpyqy\",\"nodeCount\":895891546,\"nodeSize\":\"bmdnafcbqwre\",\"nodeSizeFamily\":\"ela\",\"subscriptionId\":\"cigeleohdbvqvw\",\"resourceGroup\":\"jopwbeonrlkwz\",\"workspaceName\":\"ybxc\",\"poolName\":\"kxcpt\"},\"computeLocation\":\"qfyiaseqchkr\",\"provisioningState\":\"Canceled\",\"description\":\"azisgyk\",\"createdOn\":\"2021-05-23T19:22:14Z\",\"modifiedOn\":\"2021-11-23T05:48:50Z\",\"resourceId\":\"nbwzohmnrxxbso\",\"provisioningErrors\":[],\"isAttachedCompute\":true,\"disableLocalAuth\":false}") - .toObject(SynapseSpark.class); - Assertions.assertEquals("qfyiaseqchkr", model.computeLocation()); - Assertions.assertEquals("azisgyk", model.description()); - Assertions.assertEquals("nbwzohmnrxxbso", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(1214736566, model.properties().autoScaleProperties().minNodeCount()); - Assertions.assertEquals(false, model.properties().autoScaleProperties().enabled()); - Assertions.assertEquals(576028683, model.properties().autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(909175637, model.properties().autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.properties().autoPauseProperties().enabled()); - Assertions.assertEquals("pedbwdpyqy", model.properties().sparkVersion()); - Assertions.assertEquals(895891546, model.properties().nodeCount()); - Assertions.assertEquals("bmdnafcbqwre", model.properties().nodeSize()); - Assertions.assertEquals("ela", model.properties().nodeSizeFamily()); - Assertions.assertEquals("cigeleohdbvqvw", model.properties().subscriptionId()); - Assertions.assertEquals("jopwbeonrlkwz", model.properties().resourceGroup()); - Assertions.assertEquals("ybxc", model.properties().workspaceName()); - Assertions.assertEquals("kxcpt", model.properties().poolName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SynapseSpark model = - new SynapseSpark() - .withComputeLocation("qfyiaseqchkr") - .withDescription("azisgyk") - .withResourceId("nbwzohmnrxxbso") - .withDisableLocalAuth(false) - .withProperties( - new SynapseSparkProperties() - .withAutoScaleProperties( - new AutoScaleProperties() - .withMinNodeCount(1214736566) - .withEnabled(false) - .withMaxNodeCount(576028683)) - .withAutoPauseProperties( - new AutoPauseProperties().withDelayInMinutes(909175637).withEnabled(true)) - .withSparkVersion("pedbwdpyqy") - .withNodeCount(895891546) - .withNodeSize("bmdnafcbqwre") - .withNodeSizeFamily("ela") - .withSubscriptionId("cigeleohdbvqvw") - .withResourceGroup("jopwbeonrlkwz") - .withWorkspaceName("ybxc") - .withPoolName("kxcpt")); - model = BinaryData.fromObject(model).toObject(SynapseSpark.class); - Assertions.assertEquals("qfyiaseqchkr", model.computeLocation()); - Assertions.assertEquals("azisgyk", model.description()); - Assertions.assertEquals("nbwzohmnrxxbso", model.resourceId()); - Assertions.assertEquals(false, model.disableLocalAuth()); - Assertions.assertEquals(1214736566, model.properties().autoScaleProperties().minNodeCount()); - Assertions.assertEquals(false, model.properties().autoScaleProperties().enabled()); - Assertions.assertEquals(576028683, model.properties().autoScaleProperties().maxNodeCount()); - Assertions.assertEquals(909175637, model.properties().autoPauseProperties().delayInMinutes()); - Assertions.assertEquals(true, model.properties().autoPauseProperties().enabled()); - Assertions.assertEquals("pedbwdpyqy", model.properties().sparkVersion()); - Assertions.assertEquals(895891546, model.properties().nodeCount()); - Assertions.assertEquals("bmdnafcbqwre", model.properties().nodeSize()); - Assertions.assertEquals("ela", model.properties().nodeSizeFamily()); - Assertions.assertEquals("cigeleohdbvqvw", model.properties().subscriptionId()); - Assertions.assertEquals("jopwbeonrlkwz", model.properties().resourceGroup()); - Assertions.assertEquals("ybxc", model.properties().workspaceName()); - Assertions.assertEquals("kxcpt", model.properties().poolName()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java deleted file mode 100644 index 0680a3ac90f1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/SystemServiceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.SystemService; - -public final class SystemServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SystemService model = - BinaryData - .fromString( - "{\"systemServiceType\":\"gcgbjb\",\"publicIpAddress\":\"lfgtdysnaquflqbc\",\"version\":\"hamzjrwdkqze\"}") - .toObject(SystemService.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SystemService model = new SystemService(); - model = BinaryData.fromObject(model).toObject(SystemService.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java deleted file mode 100644 index bd094cd3e34b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalFeaturizationSettingsTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.ColumnTransformer; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalFeaturizationSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalFeaturizationSettings model = - BinaryData - .fromString( - "{\"blockedTransformers\":[\"TextTargetEncoder\"],\"columnNameAndTypes\":{\"qyv\":\"blhtjq\",\"a\":\"eh\"},\"enableDnnFeaturization\":false,\"mode\":\"Auto\",\"transformerParams\":{\"tjvv\":[{\"fields\":[\"usxivzrrryvei\",\"ipsk\"],\"parameters\":\"datazatvfuzka\"}]},\"datasetLanguage\":\"xwigsye\"}") - .toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("xwigsye", model.datasetLanguage()); - Assertions.assertEquals(BlockedTransformers.TEXT_TARGET_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("blhtjq", model.columnNameAndTypes().get("qyv")); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.mode()); - Assertions.assertEquals("usxivzrrryvei", model.transformerParams().get("tjvv").get(0).fields().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalFeaturizationSettings model = - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("xwigsye") - .withBlockedTransformers(Arrays.asList(BlockedTransformers.TEXT_TARGET_ENCODER)) - .withColumnNameAndTypes(mapOf("qyv", "blhtjq", "a", "eh")) - .withEnableDnnFeaturization(false) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams( - mapOf( - "tjvv", - Arrays - .asList( - new ColumnTransformer() - .withFields(Arrays.asList("usxivzrrryvei", "ipsk")) - .withParameters("datazatvfuzka")))); - model = BinaryData.fromObject(model).toObject(TableVerticalFeaturizationSettings.class); - Assertions.assertEquals("xwigsye", model.datasetLanguage()); - Assertions.assertEquals(BlockedTransformers.TEXT_TARGET_ENCODER, model.blockedTransformers().get(0)); - Assertions.assertEquals("blhtjq", model.columnNameAndTypes().get("qyv")); - Assertions.assertEquals(false, model.enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.mode()); - Assertions.assertEquals("usxivzrrryvei", model.transformerParams().get("tjvv").get(0).fields().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java deleted file mode 100644 index e6eec1743952..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalLimitSettingsTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalLimitSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVerticalLimitSettings model = - BinaryData - .fromString( - "{\"enableEarlyTermination\":false,\"exitScore\":93.94093189506944,\"maxConcurrentTrials\":976047571,\"maxCoresPerTrial\":1086162181,\"maxTrials\":943881137,\"timeout\":\"PT74H46M4S\",\"trialTimeout\":\"PT5H4M5S\"}") - .toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(false, model.enableEarlyTermination()); - Assertions.assertEquals(93.94093189506944D, model.exitScore()); - Assertions.assertEquals(976047571, model.maxConcurrentTrials()); - Assertions.assertEquals(1086162181, model.maxCoresPerTrial()); - Assertions.assertEquals(943881137, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT74H46M4S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT5H4M5S"), model.trialTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVerticalLimitSettings model = - new TableVerticalLimitSettings() - .withEnableEarlyTermination(false) - .withExitScore(93.94093189506944D) - .withMaxConcurrentTrials(976047571) - .withMaxCoresPerTrial(1086162181) - .withMaxTrials(943881137) - .withTimeout(Duration.parse("PT74H46M4S")) - .withTrialTimeout(Duration.parse("PT5H4M5S")); - model = BinaryData.fromObject(model).toObject(TableVerticalLimitSettings.class); - Assertions.assertEquals(false, model.enableEarlyTermination()); - Assertions.assertEquals(93.94093189506944D, model.exitScore()); - Assertions.assertEquals(976047571, model.maxConcurrentTrials()); - Assertions.assertEquals(1086162181, model.maxCoresPerTrial()); - Assertions.assertEquals(943881137, model.maxTrials()); - Assertions.assertEquals(Duration.parse("PT74H46M4S"), model.timeout()); - Assertions.assertEquals(Duration.parse("PT5H4M5S"), model.trialTimeout()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.java deleted file mode 100644 index a45b8e331985..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TableVerticalTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BlockedTransformers; -import com.azure.resourcemanager.machinelearning.models.FeaturizationMode; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NCrossValidations; -import com.azure.resourcemanager.machinelearning.models.TableVertical; -import com.azure.resourcemanager.machinelearning.models.TableVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.TableVerticalLimitSettings; -import java.time.Duration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class TableVerticalTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableVertical model = - BinaryData - .fromString( - "{\"cvSplitColumnNames\":[\"aqkue\",\"tgroesh\"],\"featurizationSettings\":{\"blockedTransformers\":[\"LabelEncoder\",\"CountVectorizer\"],\"columnNameAndTypes\":{\"vjmvqmtdwckygr\":\"qxkfaoytehqp\",\"kb\":\"ejnndljdju\",\"n\":\"req\"},\"enableDnnFeaturization\":true,\"mode\":\"Auto\",\"transformerParams\":{\"egplwr\":[]},\"datasetLanguage\":\"hwddkvbxgkq\"},\"limitSettings\":{\"enableEarlyTermination\":true,\"exitScore\":58.74936526740298,\"maxConcurrentTrials\":1893356146,\"maxCoresPerTrial\":1883292844,\"maxTrials\":501930478,\"timeout\":\"PT193H51M55S\",\"trialTimeout\":\"PT46H37M35S\"},\"nCrossValidations\":{\"mode\":\"NCrossValidations\"},\"testData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"poi\",\"description\":\"naz\"},\"testDataSize\":59.15029219925634,\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"qalsxkd\",\"description\":\"qapfgsdpc\"},\"validationDataSize\":60.92552835591164,\"weightColumnName\":\"zhhkuuipldqqc\"}") - .toObject(TableVertical.class); - Assertions.assertEquals("aqkue", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hwddkvbxgkq", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.LABEL_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("qxkfaoytehqp", model.featurizationSettings().columnNameAndTypes().get("vjmvqmtdwckygr")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(58.74936526740298D, model.limitSettings().exitScore()); - Assertions.assertEquals(1893356146, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1883292844, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(501930478, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51M55S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT46H37M35S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("naz", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("poi", model.testData().uri()); - Assertions.assertEquals(59.15029219925634D, model.testDataSize()); - Assertions.assertEquals("qapfgsdpc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("qalsxkd", model.validationData().uri()); - Assertions.assertEquals(60.92552835591164D, model.validationDataSize()); - Assertions.assertEquals("zhhkuuipldqqc", model.weightColumnName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableVertical model = - new TableVertical() - .withCvSplitColumnNames(Arrays.asList("aqkue", "tgroesh")) - .withFeaturizationSettings( - new TableVerticalFeaturizationSettings() - .withDatasetLanguage("hwddkvbxgkq") - .withBlockedTransformers( - Arrays.asList(BlockedTransformers.LABEL_ENCODER, BlockedTransformers.COUNT_VECTORIZER)) - .withColumnNameAndTypes(mapOf("vjmvqmtdwckygr", "qxkfaoytehqp", "kb", "ejnndljdju", "n", "req")) - .withEnableDnnFeaturization(true) - .withMode(FeaturizationMode.AUTO) - .withTransformerParams(mapOf("egplwr", Arrays.asList()))) - .withLimitSettings( - new TableVerticalLimitSettings() - .withEnableEarlyTermination(true) - .withExitScore(58.74936526740298D) - .withMaxConcurrentTrials(1893356146) - .withMaxCoresPerTrial(1883292844) - .withMaxTrials(501930478) - .withTimeout(Duration.parse("PT193H51M55S")) - .withTrialTimeout(Duration.parse("PT46H37M35S"))) - .withNCrossValidations(new NCrossValidations()) - .withTestData( - new MLTableJobInput() - .withDescription("naz") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("poi")) - .withTestDataSize(59.15029219925634D) - .withValidationData( - new MLTableJobInput() - .withDescription("qapfgsdpc") - .withMode(InputDeliveryMode.DIRECT) - .withUri("qalsxkd")) - .withValidationDataSize(60.92552835591164D) - .withWeightColumnName("zhhkuuipldqqc"); - model = BinaryData.fromObject(model).toObject(TableVertical.class); - Assertions.assertEquals("aqkue", model.cvSplitColumnNames().get(0)); - Assertions.assertEquals("hwddkvbxgkq", model.featurizationSettings().datasetLanguage()); - Assertions - .assertEquals( - BlockedTransformers.LABEL_ENCODER, model.featurizationSettings().blockedTransformers().get(0)); - Assertions - .assertEquals("qxkfaoytehqp", model.featurizationSettings().columnNameAndTypes().get("vjmvqmtdwckygr")); - Assertions.assertEquals(true, model.featurizationSettings().enableDnnFeaturization()); - Assertions.assertEquals(FeaturizationMode.AUTO, model.featurizationSettings().mode()); - Assertions.assertEquals(true, model.limitSettings().enableEarlyTermination()); - Assertions.assertEquals(58.74936526740298D, model.limitSettings().exitScore()); - Assertions.assertEquals(1893356146, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1883292844, model.limitSettings().maxCoresPerTrial()); - Assertions.assertEquals(501930478, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT193H51M55S"), model.limitSettings().timeout()); - Assertions.assertEquals(Duration.parse("PT46H37M35S"), model.limitSettings().trialTimeout()); - Assertions.assertEquals("naz", model.testData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.testData().mode()); - Assertions.assertEquals("poi", model.testData().uri()); - Assertions.assertEquals(59.15029219925634D, model.testDataSize()); - Assertions.assertEquals("qapfgsdpc", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.validationData().mode()); - Assertions.assertEquals("qalsxkd", model.validationData().uri()); - Assertions.assertEquals(60.92552835591164D, model.validationDataSize()); - Assertions.assertEquals("zhhkuuipldqqc", model.weightColumnName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java deleted file mode 100644 index 529ec59a2e01..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetLagsTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetLags; - -public final class TargetLagsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetLags model = BinaryData.fromString("{\"mode\":\"TargetLags\"}").toObject(TargetLags.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetLags model = new TargetLags(); - model = BinaryData.fromObject(model).toObject(TargetLags.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java deleted file mode 100644 index c8c621836287..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetRollingWindowSizeTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetRollingWindowSize; - -public final class TargetRollingWindowSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetRollingWindowSize model = - BinaryData.fromString("{\"mode\":\"TargetRollingWindowSize\"}").toObject(TargetRollingWindowSize.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetRollingWindowSize model = new TargetRollingWindowSize(); - model = BinaryData.fromObject(model).toObject(TargetRollingWindowSize.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java deleted file mode 100644 index 078f8865a89f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TargetUtilizationScaleSettingsTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TargetUtilizationScaleSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TargetUtilizationScaleSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TargetUtilizationScaleSettings model = - BinaryData - .fromString( - "{\"scaleType\":\"TargetUtilization\",\"maxInstances\":1095681099,\"minInstances\":1317358877,\"pollingInterval\":\"PT10H14M39S\",\"targetUtilizationPercentage\":93995844}") - .toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(1095681099, model.maxInstances()); - Assertions.assertEquals(1317358877, model.minInstances()); - Assertions.assertEquals(Duration.parse("PT10H14M39S"), model.pollingInterval()); - Assertions.assertEquals(93995844, model.targetUtilizationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TargetUtilizationScaleSettings model = - new TargetUtilizationScaleSettings() - .withMaxInstances(1095681099) - .withMinInstances(1317358877) - .withPollingInterval(Duration.parse("PT10H14M39S")) - .withTargetUtilizationPercentage(93995844); - model = BinaryData.fromObject(model).toObject(TargetUtilizationScaleSettings.class); - Assertions.assertEquals(1095681099, model.maxInstances()); - Assertions.assertEquals(1317358877, model.minInstances()); - Assertions.assertEquals(Duration.parse("PT10H14M39S"), model.pollingInterval()); - Assertions.assertEquals(93995844, model.targetUtilizationPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java deleted file mode 100644 index 12ea722ac887..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TensorFlowTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TensorFlow; -import org.junit.jupiter.api.Assertions; - -public final class TensorFlowTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TensorFlow model = - BinaryData - .fromString( - "{\"distributionType\":\"TensorFlow\",\"parameterServerCount\":1873881024,\"workerCount\":131974478}") - .toObject(TensorFlow.class); - Assertions.assertEquals(1873881024, model.parameterServerCount()); - Assertions.assertEquals(131974478, model.workerCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TensorFlow model = new TensorFlow().withParameterServerCount(1873881024).withWorkerCount(131974478); - model = BinaryData.fromObject(model).toObject(TensorFlow.class); - Assertions.assertEquals(1873881024, model.parameterServerCount()); - Assertions.assertEquals(131974478, model.workerCount()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.java deleted file mode 100644 index 04eaf93fc541..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationMultilabelTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassificationMultilabel; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationMultilabelTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassificationMultilabel model = - BinaryData - .fromString( - "{\"taskType\":\"TextClassificationMultilabel\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"klt\"},\"limitSettings\":{\"maxConcurrentTrials\":1366135748,\"maxTrials\":1224275689,\"timeout\":\"PT25H21M12S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalDownload\",\"uri\":\"grdcgubsrtmdy\",\"description\":\"erpi\"},\"logVerbosity\":\"Warning\",\"targetColumnName\":\"zgczfcmfpfbode\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"sr\",\"description\":\"tshuvftwaivm\"}}") - .toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("zgczfcmfpfbode", model.targetColumnName()); - Assertions.assertEquals("tshuvftwaivm", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("sr", model.trainingData().uri()); - Assertions.assertEquals("klt", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1366135748, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1224275689, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT25H21M12S"), model.limitSettings().timeout()); - Assertions.assertEquals("erpi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("grdcgubsrtmdy", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassificationMultilabel model = - new TextClassificationMultilabel() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("zgczfcmfpfbode") - .withTrainingData( - new MLTableJobInput() - .withDescription("tshuvftwaivm") - .withMode(InputDeliveryMode.DIRECT) - .withUri("sr")) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("klt")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1366135748) - .withMaxTrials(1224275689) - .withTimeout(Duration.parse("PT25H21M12S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("erpi") - .withMode(InputDeliveryMode.EVAL_DOWNLOAD) - .withUri("grdcgubsrtmdy")); - model = BinaryData.fromObject(model).toObject(TextClassificationMultilabel.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("zgczfcmfpfbode", model.targetColumnName()); - Assertions.assertEquals("tshuvftwaivm", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DIRECT, model.trainingData().mode()); - Assertions.assertEquals("sr", model.trainingData().uri()); - Assertions.assertEquals("klt", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1366135748, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1224275689, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT25H21M12S"), model.limitSettings().timeout()); - Assertions.assertEquals("erpi", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_DOWNLOAD, model.validationData().mode()); - Assertions.assertEquals("grdcgubsrtmdy", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java deleted file mode 100644 index cc6b6e0733ab..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextClassificationTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ClassificationPrimaryMetrics; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextClassification; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextClassificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextClassification model = - BinaryData - .fromString( - "{\"taskType\":\"TextClassification\",\"primaryMetric\":\"AveragePrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"tsffo\"},\"limitSettings\":{\"maxConcurrentTrials\":650758189,\"maxTrials\":560959800,\"timeout\":\"PT174H2M54S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadOnlyMount\",\"uri\":\"w\",\"description\":\"cgwdfriwgybjp\"},\"logVerbosity\":\"Warning\",\"targetColumnName\":\"scvgl\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"EvalMount\",\"uri\":\"dgbyfgwewqkjvxp\",\"description\":\"pxsoohu\"}}") - .toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("scvgl", model.targetColumnName()); - Assertions.assertEquals("pxsoohu", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals("tsffo", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(650758189, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(560959800, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT174H2M54S"), model.limitSettings().timeout()); - Assertions.assertEquals("cgwdfriwgybjp", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("w", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextClassification model = - new TextClassification() - .withLogVerbosity(LogVerbosity.WARNING) - .withTargetColumnName("scvgl") - .withTrainingData( - new MLTableJobInput() - .withDescription("pxsoohu") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("dgbyfgwewqkjvxp")) - .withPrimaryMetric(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED) - .withFeaturizationSettings(new NlpVerticalFeaturizationSettings().withDatasetLanguage("tsffo")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(650758189) - .withMaxTrials(560959800) - .withTimeout(Duration.parse("PT174H2M54S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("cgwdfriwgybjp") - .withMode(InputDeliveryMode.READ_ONLY_MOUNT) - .withUri("w")); - model = BinaryData.fromObject(model).toObject(TextClassification.class); - Assertions.assertEquals(LogVerbosity.WARNING, model.logVerbosity()); - Assertions.assertEquals("scvgl", model.targetColumnName()); - Assertions.assertEquals("pxsoohu", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.trainingData().mode()); - Assertions.assertEquals("dgbyfgwewqkjvxp", model.trainingData().uri()); - Assertions.assertEquals(ClassificationPrimaryMetrics.AVERAGE_PRECISION_SCORE_WEIGHTED, model.primaryMetric()); - Assertions.assertEquals("tsffo", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(650758189, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(560959800, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT174H2M54S"), model.limitSettings().timeout()); - Assertions.assertEquals("cgwdfriwgybjp", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.validationData().mode()); - Assertions.assertEquals("w", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.java deleted file mode 100644 index 66c830fc80a6..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TextNerTests.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.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.LogVerbosity; -import com.azure.resourcemanager.machinelearning.models.MLTableJobInput; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalFeaturizationSettings; -import com.azure.resourcemanager.machinelearning.models.NlpVerticalLimitSettings; -import com.azure.resourcemanager.machinelearning.models.TextNer; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TextNerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TextNer model = - BinaryData - .fromString( - "{\"taskType\":\"TextNER\",\"primaryMetric\":\"PrecisionScoreWeighted\",\"featurizationSettings\":{\"datasetLanguage\":\"zgjypanhxmpdxxz\"},\"limitSettings\":{\"maxConcurrentTrials\":1172972444,\"maxTrials\":1745453139,\"timeout\":\"PT16H13M18S\"},\"validationData\":{\"jobInputType\":\"mltable\",\"mode\":\"ReadWriteMount\",\"uri\":\"lkfhglhrfoxqwec\",\"description\":\"nhpcselqx\"},\"logVerbosity\":\"Critical\",\"targetColumnName\":\"qibukklvzrl\",\"trainingData\":{\"jobInputType\":\"mltable\",\"mode\":\"Download\",\"uri\":\"ccmetjsczivfqb\",\"description\":\"asdsyenzsie\"}}") - .toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("qibukklvzrl", model.targetColumnName()); - Assertions.assertEquals("asdsyenzsie", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ccmetjsczivfqb", model.trainingData().uri()); - Assertions.assertEquals("zgjypanhxmpdxxz", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1172972444, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1745453139, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT16H13M18S"), model.limitSettings().timeout()); - Assertions.assertEquals("nhpcselqx", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lkfhglhrfoxqwec", model.validationData().uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TextNer model = - new TextNer() - .withLogVerbosity(LogVerbosity.CRITICAL) - .withTargetColumnName("qibukklvzrl") - .withTrainingData( - new MLTableJobInput() - .withDescription("asdsyenzsie") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("ccmetjsczivfqb")) - .withFeaturizationSettings( - new NlpVerticalFeaturizationSettings().withDatasetLanguage("zgjypanhxmpdxxz")) - .withLimitSettings( - new NlpVerticalLimitSettings() - .withMaxConcurrentTrials(1172972444) - .withMaxTrials(1745453139) - .withTimeout(Duration.parse("PT16H13M18S"))) - .withValidationData( - new MLTableJobInput() - .withDescription("nhpcselqx") - .withMode(InputDeliveryMode.READ_WRITE_MOUNT) - .withUri("lkfhglhrfoxqwec")); - model = BinaryData.fromObject(model).toObject(TextNer.class); - Assertions.assertEquals(LogVerbosity.CRITICAL, model.logVerbosity()); - Assertions.assertEquals("qibukklvzrl", model.targetColumnName()); - Assertions.assertEquals("asdsyenzsie", model.trainingData().description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.trainingData().mode()); - Assertions.assertEquals("ccmetjsczivfqb", model.trainingData().uri()); - Assertions.assertEquals("zgjypanhxmpdxxz", model.featurizationSettings().datasetLanguage()); - Assertions.assertEquals(1172972444, model.limitSettings().maxConcurrentTrials()); - Assertions.assertEquals(1745453139, model.limitSettings().maxTrials()); - Assertions.assertEquals(Duration.parse("PT16H13M18S"), model.limitSettings().timeout()); - Assertions.assertEquals("nhpcselqx", model.validationData().description()); - Assertions.assertEquals(InputDeliveryMode.READ_WRITE_MOUNT, model.validationData().mode()); - Assertions.assertEquals("lkfhglhrfoxqwec", model.validationData().uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java deleted file mode 100644 index c92f459fe17f..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TrainingSettingsTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.StackEnsembleSettings; -import com.azure.resourcemanager.machinelearning.models.StackMetaLearnerType; -import com.azure.resourcemanager.machinelearning.models.TrainingSettings; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class TrainingSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrainingSettings model = - BinaryData - .fromString( - "{\"enableDnnTraining\":false,\"enableModelExplainability\":false,\"enableOnnxCompatibleModels\":true,\"enableStackEnsemble\":false,\"enableVoteEnsemble\":false,\"ensembleModelDownloadTimeout\":\"PT109H29M10S\",\"stackEnsembleSettings\":{\"stackMetaLearnerKWargs\":\"datajtasbvwispk\",\"stackMetaLearnerTrainPercentage\":99.23936213293845,\"stackMetaLearnerType\":\"LogisticRegressionCV\"}}") - .toObject(TrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT109H29M10S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(99.23936213293845D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrainingSettings model = - new TrainingSettings() - .withEnableDnnTraining(false) - .withEnableModelExplainability(false) - .withEnableOnnxCompatibleModels(true) - .withEnableStackEnsemble(false) - .withEnableVoteEnsemble(false) - .withEnsembleModelDownloadTimeout(Duration.parse("PT109H29M10S")) - .withStackEnsembleSettings( - new StackEnsembleSettings() - .withStackMetaLearnerKWargs("datajtasbvwispk") - .withStackMetaLearnerTrainPercentage(99.23936213293845D) - .withStackMetaLearnerType(StackMetaLearnerType.LOGISTIC_REGRESSION_CV)); - model = BinaryData.fromObject(model).toObject(TrainingSettings.class); - Assertions.assertEquals(false, model.enableDnnTraining()); - Assertions.assertEquals(false, model.enableModelExplainability()); - Assertions.assertEquals(true, model.enableOnnxCompatibleModels()); - Assertions.assertEquals(false, model.enableStackEnsemble()); - Assertions.assertEquals(false, model.enableVoteEnsemble()); - Assertions.assertEquals(Duration.parse("PT109H29M10S"), model.ensembleModelDownloadTimeout()); - Assertions.assertEquals(99.23936213293845D, model.stackEnsembleSettings().stackMetaLearnerTrainPercentage()); - Assertions - .assertEquals( - StackMetaLearnerType.LOGISTIC_REGRESSION_CV, model.stackEnsembleSettings().stackMetaLearnerType()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java deleted file mode 100644 index 5983c0e76c29..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TriggerBaseTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TriggerBase; -import org.junit.jupiter.api.Assertions; - -public final class TriggerBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TriggerBase model = - BinaryData - .fromString( - "{\"triggerType\":\"TriggerBase\",\"endTime\":\"plucfotangcfhnyk\",\"startTime\":\"ugswvx\",\"timeZone\":\"mzqwmvtxnjmxmcu\"}") - .toObject(TriggerBase.class); - Assertions.assertEquals("plucfotangcfhnyk", model.endTime()); - Assertions.assertEquals("ugswvx", model.startTime()); - Assertions.assertEquals("mzqwmvtxnjmxmcu", model.timeZone()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TriggerBase model = - new TriggerBase().withEndTime("plucfotangcfhnyk").withStartTime("ugswvx").withTimeZone("mzqwmvtxnjmxmcu"); - model = BinaryData.fromObject(model).toObject(TriggerBase.class); - Assertions.assertEquals("plucfotangcfhnyk", model.endTime()); - Assertions.assertEquals("ugswvx", model.startTime()); - Assertions.assertEquals("mzqwmvtxnjmxmcu", model.timeZone()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java deleted file mode 100644 index e2370f8f1842..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobInputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobInput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"triton_model\",\"mode\":\"Download\",\"uri\":\"plhyvd\",\"description\":\"lyzkxitds\"}") - .toObject(TritonModelJobInput.class); - Assertions.assertEquals("lyzkxitds", model.description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); - Assertions.assertEquals("plhyvd", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobInput model = - new TritonModelJobInput() - .withDescription("lyzkxitds") - .withMode(InputDeliveryMode.DOWNLOAD) - .withUri("plhyvd"); - model = BinaryData.fromObject(model).toObject(TritonModelJobInput.class); - Assertions.assertEquals("lyzkxitds", model.description()); - Assertions.assertEquals(InputDeliveryMode.DOWNLOAD, model.mode()); - Assertions.assertEquals("plhyvd", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java deleted file mode 100644 index 55fbe2e470fe..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TritonModelJobOutputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.TritonModelJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class TritonModelJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TritonModelJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"triton_model\",\"mode\":\"ReadWriteMount\",\"uri\":\"vkolrupjovmo\",\"description\":\"ayeb\"}") - .toObject(TritonModelJobOutput.class); - Assertions.assertEquals("ayeb", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("vkolrupjovmo", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TritonModelJobOutput model = - new TritonModelJobOutput() - .withDescription("ayeb") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("vkolrupjovmo"); - model = BinaryData.fromObject(model).toObject(TritonModelJobOutput.class); - Assertions.assertEquals("ayeb", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("vkolrupjovmo", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java deleted file mode 100644 index 904af93fa355..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/TruncationSelectionPolicyTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.TruncationSelectionPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TruncationSelectionPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TruncationSelectionPolicy model = - BinaryData - .fromString( - "{\"policyType\":\"TruncationSelection\",\"truncationPercentage\":1106944697,\"delayEvaluation\":674073421,\"evaluationInterval\":1924509674}") - .toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(674073421, model.delayEvaluation()); - Assertions.assertEquals(1924509674, model.evaluationInterval()); - Assertions.assertEquals(1106944697, model.truncationPercentage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TruncationSelectionPolicy model = - new TruncationSelectionPolicy() - .withDelayEvaluation(674073421) - .withEvaluationInterval(1924509674) - .withTruncationPercentage(1106944697); - model = BinaryData.fromObject(model).toObject(TruncationSelectionPolicy.class); - Assertions.assertEquals(674073421, model.delayEvaluation()); - Assertions.assertEquals(1924509674, model.evaluationInterval()); - Assertions.assertEquals(1106944697, model.truncationPercentage()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java deleted file mode 100644 index acdc83131e6c..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasResultInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UpdateWorkspaceQuotasResultInner; - -public final class UpdateWorkspaceQuotasResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"dxwzywqsmbsurexi\",\"type\":\"ryocfsfksymdd\",\"limit\":2863300785135771862,\"unit\":\"Count\",\"status\":\"OperationNotSupportedForSku\"},{\"id\":\"qyud\",\"type\":\"rrqnbpoczvyifqrv\",\"limit\":4225896230813201107,\"unit\":\"Count\",\"status\":\"Undefined\"},{\"id\":\"vvdfwatkpnpul\",\"type\":\"xbczwtruwiqz\",\"limit\":535203573928767895,\"unit\":\"Count\",\"status\":\"InvalidVMFamilyName\"},{\"id\":\"okacspk\",\"type\":\"hzdobpxjmflbvvnc\",\"limit\":5158769929678256713,\"unit\":\"Count\",\"status\":\"Failure\"}],\"nextLink\":\"juqk\"}") - .toObject(UpdateWorkspaceQuotasResultInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotasResultInner model = new UpdateWorkspaceQuotasResultInner(); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotasResultInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java deleted file mode 100644 index 4b480a366fbf..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UpdateWorkspaceQuotasTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.Status; -import com.azure.resourcemanager.machinelearning.models.UpdateWorkspaceQuotas; -import org.junit.jupiter.api.Assertions; - -public final class UpdateWorkspaceQuotasTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateWorkspaceQuotas model = - BinaryData - .fromString( - "{\"id\":\"sa\",\"type\":\"wkuofoskghsauu\",\"limit\":6549860277400431394,\"unit\":\"Count\",\"status\":\"Failure\"}") - .toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(6549860277400431394L, model.limit()); - Assertions.assertEquals(Status.FAILURE, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateWorkspaceQuotas model = - new UpdateWorkspaceQuotas().withLimit(6549860277400431394L).withStatus(Status.FAILURE); - model = BinaryData.fromObject(model).toObject(UpdateWorkspaceQuotas.class); - Assertions.assertEquals(6549860277400431394L, model.limit()); - Assertions.assertEquals(Status.FAILURE, model.status()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java deleted file mode 100644 index d99e7f294cc1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileDataVersionTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFileDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFileDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileDataVersion model = - BinaryData - .fromString( - "{\"dataType\":\"uri_file\",\"dataUri\":\"zbtz\",\"isAnonymous\":true,\"isArchived\":true,\"description\":\"pfs\",\"properties\":{\"ezacfpztga\":\"pfnocm\",\"ctgkppgkqzkcyzmf\":\"wyqejgaao\"},\"tags\":{\"hlcqvhoe\":\"dyfcix\",\"mkahpqha\":\"goiutgw\",\"mip\":\"yntacihnco\",\"i\":\"mliqmvlb\"}}") - .toObject(UriFileDataVersion.class); - Assertions.assertEquals("pfs", model.description()); - Assertions.assertEquals("pfnocm", model.properties().get("ezacfpztga")); - Assertions.assertEquals("dyfcix", model.tags().get("hlcqvhoe")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("zbtz", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileDataVersion model = - new UriFileDataVersion() - .withDescription("pfs") - .withProperties(mapOf("ezacfpztga", "pfnocm", "ctgkppgkqzkcyzmf", "wyqejgaao")) - .withTags(mapOf("hlcqvhoe", "dyfcix", "mkahpqha", "goiutgw", "mip", "yntacihnco", "i", "mliqmvlb")) - .withIsAnonymous(true) - .withIsArchived(true) - .withDataUri("zbtz"); - model = BinaryData.fromObject(model).toObject(UriFileDataVersion.class); - Assertions.assertEquals("pfs", model.description()); - Assertions.assertEquals("pfnocm", model.properties().get("ezacfpztga")); - Assertions.assertEquals("dyfcix", model.tags().get("hlcqvhoe")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(true, model.isArchived()); - Assertions.assertEquals("zbtz", model.dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java deleted file mode 100644 index a0df6aaca2b7..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobInputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"uri_file\",\"mode\":\"ReadOnlyMount\",\"uri\":\"qgrvg\",\"description\":\"mxpu\"}") - .toObject(UriFileJobInput.class); - Assertions.assertEquals("mxpu", model.description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("qgrvg", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobInput model = - new UriFileJobInput().withDescription("mxpu").withMode(InputDeliveryMode.READ_ONLY_MOUNT).withUri("qgrvg"); - model = BinaryData.fromObject(model).toObject(UriFileJobInput.class); - Assertions.assertEquals("mxpu", model.description()); - Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode()); - Assertions.assertEquals("qgrvg", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java deleted file mode 100644 index 60c97ca9dc20..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFileJobOutputTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFileJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFileJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFileJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"uri_file\",\"mode\":\"Upload\",\"uri\":\"dfj\",\"description\":\"esocwiqbuou\"}") - .toObject(UriFileJobOutput.class); - Assertions.assertEquals("esocwiqbuou", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("dfj", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFileJobOutput model = - new UriFileJobOutput().withDescription("esocwiqbuou").withMode(OutputDeliveryMode.UPLOAD).withUri("dfj"); - model = BinaryData.fromObject(model).toObject(UriFileJobOutput.class); - Assertions.assertEquals("esocwiqbuou", model.description()); - Assertions.assertEquals(OutputDeliveryMode.UPLOAD, model.mode()); - Assertions.assertEquals("dfj", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java deleted file mode 100644 index 6d354ce0c424..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderDataVersionTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UriFolderDataVersion; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderDataVersionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderDataVersion model = - BinaryData - .fromString( - "{\"dataType\":\"uri_folder\",\"dataUri\":\"mpyzgleo\",\"isAnonymous\":true,\"isArchived\":false,\"description\":\"wwzvdaj\",\"properties\":{\"fmaciqgjjrlhiq\":\"n\",\"jtt\":\"wixvtbouguxtndop\",\"bkixvvlwyn\":\"asualapdlndbea\",\"qvzfj\":\"bb\"},\"tags\":{\"mphfkyezolgjzm\":\"ugzfeuzjl\"}}") - .toObject(UriFolderDataVersion.class); - Assertions.assertEquals("wwzvdaj", model.description()); - Assertions.assertEquals("n", model.properties().get("fmaciqgjjrlhiq")); - Assertions.assertEquals("ugzfeuzjl", model.tags().get("mphfkyezolgjzm")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("mpyzgleo", model.dataUri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderDataVersion model = - new UriFolderDataVersion() - .withDescription("wwzvdaj") - .withProperties( - mapOf( - "fmaciqgjjrlhiq", - "n", - "jtt", - "wixvtbouguxtndop", - "bkixvvlwyn", - "asualapdlndbea", - "qvzfj", - "bb")) - .withTags(mapOf("mphfkyezolgjzm", "ugzfeuzjl")) - .withIsAnonymous(true) - .withIsArchived(false) - .withDataUri("mpyzgleo"); - model = BinaryData.fromObject(model).toObject(UriFolderDataVersion.class); - Assertions.assertEquals("wwzvdaj", model.description()); - Assertions.assertEquals("n", model.properties().get("fmaciqgjjrlhiq")); - Assertions.assertEquals("ugzfeuzjl", model.tags().get("mphfkyezolgjzm")); - Assertions.assertEquals(true, model.isAnonymous()); - Assertions.assertEquals(false, model.isArchived()); - Assertions.assertEquals("mpyzgleo", model.dataUri()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java deleted file mode 100644 index b1e8226f6f18..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobInputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.InputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobInput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobInputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobInput model = - BinaryData - .fromString( - "{\"jobInputType\":\"uri_folder\",\"mode\":\"EvalMount\",\"uri\":\"ydoccnxshanzb\",\"description\":\"adh\"}") - .toObject(UriFolderJobInput.class); - Assertions.assertEquals("adh", model.description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.mode()); - Assertions.assertEquals("ydoccnxshanzb", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobInput model = - new UriFolderJobInput() - .withDescription("adh") - .withMode(InputDeliveryMode.EVAL_MOUNT) - .withUri("ydoccnxshanzb"); - model = BinaryData.fromObject(model).toObject(UriFolderJobInput.class); - Assertions.assertEquals("adh", model.description()); - Assertions.assertEquals(InputDeliveryMode.EVAL_MOUNT, model.mode()); - Assertions.assertEquals("ydoccnxshanzb", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java deleted file mode 100644 index 7511a7ec6d45..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UriFolderJobOutputTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.OutputDeliveryMode; -import com.azure.resourcemanager.machinelearning.models.UriFolderJobOutput; -import org.junit.jupiter.api.Assertions; - -public final class UriFolderJobOutputTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UriFolderJobOutput model = - BinaryData - .fromString( - "{\"jobOutputType\":\"uri_folder\",\"mode\":\"ReadWriteMount\",\"uri\":\"caatsdohzniucbda\",\"description\":\"b\"}") - .toObject(UriFolderJobOutput.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("caatsdohzniucbda", model.uri()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UriFolderJobOutput model = - new UriFolderJobOutput() - .withDescription("b") - .withMode(OutputDeliveryMode.READ_WRITE_MOUNT) - .withUri("caatsdohzniucbda"); - model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode()); - Assertions.assertEquals("caatsdohzniucbda", model.uri()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java deleted file mode 100644 index dc5abc4da1a0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.UsageInner; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = - BinaryData - .fromString( - "{\"id\":\"al\",\"amlWorkspaceLocation\":\"wsubisnja\",\"type\":\"mngnzscxaqw\",\"unit\":\"Count\",\"currentValue\":8284849522775064668,\"limit\":4293534997392812714,\"name\":{\"value\":\"kvlrxnj\",\"localizedValue\":\"seiphe\"}}") - .toObject(UsageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner(); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java deleted file mode 100644 index 51468bd4dbf3..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsageNameTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UsageName; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model = - BinaryData.fromString("{\"value\":\"lokeyy\",\"localizedValue\":\"nj\"}").toObject(UsageName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName(); - model = BinaryData.fromObject(model).toObject(UsageName.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java deleted file mode 100644 index 11d6eafc68b8..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UsagesListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.Usage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"dxku\",\"amlWorkspaceLocation\":\"kczynuhhoqeqsh\",\"type\":\"ljqkxyrqolnthbb\",\"unit\":\"Count\",\"currentValue\":6327166092096941565,\"limit\":45876676244603547,\"name\":{\"value\":\"kjthfce\",\"localizedValue\":\"ncjmlfuyf\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.usages().list("aaxoialahfxwcc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 9233f673cb97..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"482ca507-d71f-4817-b618-8233dec4afc2\",\"clientId\":\"08c17000-9968-4d5e-b89a-5cd50023b58b\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java deleted file mode 100644 index a6544cd23012..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/UserIdentityTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.UserIdentity; - -public final class UserIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserIdentity model = BinaryData.fromString("{\"identityType\":\"UserIdentity\"}").toObject(UserIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserIdentity model = new UserIdentity(); - model = BinaryData.fromObject(model).toObject(UserIdentity.class); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java deleted file mode 100644 index d5961556e5fd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineImageTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineImage; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineImage model = - BinaryData.fromString("{\"id\":\"vbopfppdbwnu\"}").toObject(VirtualMachineImage.class); - Assertions.assertEquals("vbopfppdbwnu", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineImage model = new VirtualMachineImage().withId("vbopfppdbwnu"); - model = BinaryData.fromObject(model).toObject(VirtualMachineImage.class); - Assertions.assertEquals("vbopfppdbwnu", model.id()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java deleted file mode 100644 index 9f29c5acc8d0..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeListResultInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.VirtualMachineSizeListResultInner; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSizeListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"tgrhpdjpjumas\",\"family\":\"zj\",\"vCPUs\":1063088657,\"gpus\":973371108,\"osVhdSizeMB\":1267309720,\"maxResourceVolumeMB\":285130790,\"memoryGB\":62.19358841158077,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"dgwdslfhot\",\"mcy\",\"pwlbjnpg\"]},{\"name\":\"ftadehxnltyfs\",\"family\":\"pusuesn\",\"vCPUs\":1828932864,\"gpus\":317621756,\"osVhdSizeMB\":600821678,\"maxResourceVolumeMB\":1696341054,\"memoryGB\":51.36310108881028,\"lowPriorityCapable\":false,\"premiumIO\":true,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"udwxdndnvowguj\",\"ugw\"]},{\"name\":\"cglhslazjdyggdt\",\"family\":\"xhbkuofq\",\"vCPUs\":358956997,\"gpus\":1965159297,\"osVhdSizeMB\":1807410645,\"maxResourceVolumeMB\":1520793095,\"memoryGB\":45.72291424975317,\"lowPriorityCapable\":false,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[]},\"supportedComputeTypes\":[\"bvyvdcsity\"]}]}") - .toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals("dgwdslfhot", model.value().get(0).supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSizeListResultInner model = - new VirtualMachineSizeListResultInner() - .withValue( - Arrays - .asList( - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("dgwdslfhot", "mcy", "pwlbjnpg")), - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("udwxdndnvowguj", "ugw")), - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues(Arrays.asList())) - .withSupportedComputeTypes(Arrays.asList("bvyvdcsity")))); - model = BinaryData.fromObject(model).toObject(VirtualMachineSizeListResultInner.class); - Assertions.assertEquals(BillingCurrency.USD, model.value().get(0).estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.value().get(0).estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals("dgwdslfhot", model.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java deleted file mode 100644 index cf90d3601f44..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizeTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.BillingCurrency; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrice; -import com.azure.resourcemanager.machinelearning.models.EstimatedVMPrices; -import com.azure.resourcemanager.machinelearning.models.UnitOfMeasure; -import com.azure.resourcemanager.machinelearning.models.VMPriceOSType; -import com.azure.resourcemanager.machinelearning.models.VMTier; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSize; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VirtualMachineSizeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualMachineSize model = - BinaryData - .fromString( - "{\"name\":\"aamdect\",\"family\":\"f\",\"vCPUs\":1860942440,\"gpus\":993666965,\"osVhdSizeMB\":230831104,\"maxResourceVolumeMB\":796129419,\"memoryGB\":78.8172659538708,\"lowPriorityCapable\":true,\"premiumIO\":false,\"estimatedVMPrices\":{\"billingCurrency\":\"USD\",\"unitOfMeasure\":\"OneHour\",\"values\":[{\"retailPrice\":43.63741417101916,\"osType\":\"Linux\",\"vmTier\":\"Standard\"},{\"retailPrice\":10.488278430863074,\"osType\":\"Windows\",\"vmTier\":\"LowPriority\"},{\"retailPrice\":12.69677181728943,\"osType\":\"Windows\",\"vmTier\":\"Standard\"},{\"retailPrice\":38.22056349066922,\"osType\":\"Linux\",\"vmTier\":\"LowPriority\"}]},\"supportedComputeTypes\":[\"pkc\",\"t\",\"pngjcrcczsqpjhvm\"]}") - .toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(43.63741417101916, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("pkc", model.supportedComputeTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualMachineSize model = - new VirtualMachineSize() - .withEstimatedVMPrices( - new EstimatedVMPrices() - .withBillingCurrency(BillingCurrency.USD) - .withUnitOfMeasure(UnitOfMeasure.ONE_HOUR) - .withValues( - Arrays - .asList( - new EstimatedVMPrice() - .withRetailPrice(43.63741417101916) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice() - .withRetailPrice(10.488278430863074) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.LOW_PRIORITY), - new EstimatedVMPrice() - .withRetailPrice(12.69677181728943) - .withOsType(VMPriceOSType.WINDOWS) - .withVmTier(VMTier.STANDARD), - new EstimatedVMPrice() - .withRetailPrice(38.22056349066922) - .withOsType(VMPriceOSType.LINUX) - .withVmTier(VMTier.LOW_PRIORITY)))) - .withSupportedComputeTypes(Arrays.asList("pkc", "t", "pngjcrcczsqpjhvm")); - model = BinaryData.fromObject(model).toObject(VirtualMachineSize.class); - Assertions.assertEquals(BillingCurrency.USD, model.estimatedVMPrices().billingCurrency()); - Assertions.assertEquals(UnitOfMeasure.ONE_HOUR, model.estimatedVMPrices().unitOfMeasure()); - Assertions.assertEquals(43.63741417101916, model.estimatedVMPrices().values().get(0).retailPrice()); - Assertions.assertEquals(VMPriceOSType.LINUX, model.estimatedVMPrices().values().get(0).osType()); - Assertions.assertEquals(VMTier.STANDARD, model.estimatedVMPrices().values().get(0).vmTier()); - Assertions.assertEquals("pkc", model.supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java deleted file mode 100644 index 8669b4c6f147..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/VirtualMachineSizesListWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.VirtualMachineSizeListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class VirtualMachineSizesListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"mq\",\"family\":\"uiocuselqkrsazr\",\"vCPUs\":907855670,\"gpus\":162147994,\"osVhdSizeMB\":1160671233,\"maxResourceVolumeMB\":1893332175,\"memoryGB\":44.634673287925494,\"lowPriorityCapable\":false,\"premiumIO\":true,\"supportedComputeTypes\":[\"mw\",\"mdlgy\",\"ixokwtjawhv\",\"gnqfqqdlcvmyol\"]},{\"name\":\"ymjc\",\"family\":\"vsnvlaq\",\"vCPUs\":4380351,\"gpus\":1268203688,\"osVhdSizeMB\":1622025421,\"maxResourceVolumeMB\":2099242028,\"memoryGB\":84.58306289880801,\"lowPriorityCapable\":true,\"premiumIO\":true,\"supportedComputeTypes\":[\"thymgobl\",\"msn\",\"gwi\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VirtualMachineSizeListResult response = - manager.virtualMachineSizes().listWithResponse("bpfiddhlrufz", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("mw", response.value().get(0).supportedComputeTypes().get(0)); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java deleted file mode 100644 index 2222100f2048..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionManagedIdentityTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionManagedIdentity model = - BinaryData - .fromString("{\"resourceId\":\"ivensrpmeyyvpk\",\"clientId\":\"tlbijpzg\"}") - .toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("ivensrpmeyyvpk", model.resourceId()); - Assertions.assertEquals("tlbijpzg", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionManagedIdentity model = - new WorkspaceConnectionManagedIdentity().withResourceId("ivensrpmeyyvpk").withClientId("tlbijpzg"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionManagedIdentity.class); - Assertions.assertEquals("ivensrpmeyyvpk", model.resourceId()); - Assertions.assertEquals("tlbijpzg", model.clientId()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java deleted file mode 100644 index 67d94947eea1..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPersonalAccessTokenTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPersonalAccessToken; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPersonalAccessTokenTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = - BinaryData.fromString("{\"pat\":\"phuuuerctato\"}").toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("phuuuerctato", model.pat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPersonalAccessToken model = - new WorkspaceConnectionPersonalAccessToken().withPat("phuuuerctato"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPersonalAccessToken.class); - Assertions.assertEquals("phuuuerctato", model.pat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java deleted file mode 100644 index a275c7a557c9..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"PythonFeed\",\"target\":\"yqsemwa\",\"value\":\"ets\",\"valueFormat\":\"JSON\"},\"id\":\"h\",\"name\":\"d\",\"type\":\"lvwiwubmwmbesl\"}],\"nextLink\":\"k\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.value().get(0).properties().category()); - Assertions.assertEquals("yqsemwa", model.value().get(0).properties().target()); - Assertions.assertEquals("ets", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult model = - new WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult() - .withValue( - Arrays - .asList( - new WorkspaceConnectionPropertiesV2BasicResourceInner() - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("yqsemwa") - .withValue("ets") - .withValueFormat(ValueFormat.JSON)))); - model = - BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceArmPaginatedResult.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.value().get(0).properties().category()); - Assertions.assertEquals("yqsemwa", model.value().get(0).properties().target()); - Assertions.assertEquals("ets", model.value().get(0).properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.value().get(0).properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java deleted file mode 100644 index be9c021e2284..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2BasicResourceInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspaceConnectionPropertiesV2BasicResourceInner; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2BasicResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"wiydmcwyhzdxssad\",\"value\":\"mnvdfzn\",\"valueFormat\":\"JSON\"},\"id\":\"dvxzbncblylpst\",\"name\":\"bhhxsrzdzuc\",\"type\":\"rsc\"}") - .toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, model.properties().category()); - Assertions.assertEquals("wiydmcwyhzdxssad", model.properties().target()); - Assertions.assertEquals("mnvdfzn", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2BasicResourceInner model = - new WorkspaceConnectionPropertiesV2BasicResourceInner() - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.CONTAINER_REGISTRY) - .withTarget("wiydmcwyhzdxssad") - .withValue("mnvdfzn") - .withValueFormat(ValueFormat.JSON)); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2BasicResourceInner.class); - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, model.properties().category()); - Assertions.assertEquals("wiydmcwyhzdxssad", model.properties().target()); - Assertions.assertEquals("mnvdfzn", model.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, model.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java deleted file mode 100644 index 2c2c30c1704b..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionPropertiesV2Tests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionPropertiesV2Tests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = - BinaryData - .fromString( - "{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"PythonFeed\",\"target\":\"evfiwjmygt\",\"value\":\"slswtm\",\"valueFormat\":\"JSON\"}") - .toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.category()); - Assertions.assertEquals("evfiwjmygt", model.target()); - Assertions.assertEquals("slswtm", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionPropertiesV2 model = - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("evfiwjmygt") - .withValue("slswtm") - .withValueFormat(ValueFormat.JSON); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionPropertiesV2.class); - Assertions.assertEquals(ConnectionCategory.PYTHON_FEED, model.category()); - Assertions.assertEquals("evfiwjmygt", model.target()); - Assertions.assertEquals("slswtm", model.value()); - Assertions.assertEquals(ValueFormat.JSON, model.valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java deleted file mode 100644 index bdf2992d956d..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionSharedAccessSignatureTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionSharedAccessSignature; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceConnectionSharedAccessSignatureTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = - BinaryData - .fromString("{\"sas\":\"uczkgofxyfsruc\"}") - .toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("uczkgofxyfsruc", model.sas()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceConnectionSharedAccessSignature model = - new WorkspaceConnectionSharedAccessSignature().withSas("uczkgofxyfsruc"); - model = BinaryData.fromObject(model).toObject(WorkspaceConnectionSharedAccessSignature.class); - Assertions.assertEquals("uczkgofxyfsruc", model.sas()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java deleted file mode 100644 index 14485908f4c2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsCreateWithResponseMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"zuzhasup\",\"value\":\"p\",\"valueFormat\":\"JSON\"},\"id\":\"zvzqazvbkark\",\"name\":\"tgongrua\",\"type\":\"s\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = - manager - .workspaceConnections() - .define("rwqirvtktyhhmvf") - .withExistingWorkspace("ouigdmfivjqte", "dqqigdydkghpc") - .withProperties( - new WorkspaceConnectionPropertiesV2() - .withCategory(ConnectionCategory.PYTHON_FEED) - .withTarget("jajodmkrr") - .withValue("pgqvqo") - .withValueFormat(ValueFormat.JSON)) - .create(); - - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, response.properties().category()); - Assertions.assertEquals("zuzhasup", response.properties().target()); - Assertions.assertEquals("p", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java deleted file mode 100644 index a777528a8091..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workspaceConnections() - .deleteWithResponse("paczmuh", "cakznhokhoitwhrj", "dmmazdnc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 2cf32122e828..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsGetWithResponseMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"ContainerRegistry\",\"target\":\"gzhogsmgbvmtd\",\"value\":\"qbe\",\"valueFormat\":\"JSON\"},\"id\":\"veglabtvkbiwzn\",\"name\":\"tfgfic\",\"type\":\"dyhi\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceConnectionPropertiesV2BasicResource response = - manager - .workspaceConnections() - .getWithResponse("ekymffztsilscvqs", "eiihfymko", "ihyeseu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ConnectionCategory.CONTAINER_REGISTRY, response.properties().category()); - Assertions.assertEquals("gzhogsmgbvmtd", response.properties().target()); - Assertions.assertEquals("qbe", response.properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.java deleted file mode 100644 index 741984a8bacd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceConnectionsListMockTests.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.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ConnectionCategory; -import com.azure.resourcemanager.machinelearning.models.ValueFormat; -import com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2BasicResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"authType\":\"WorkspaceConnectionPropertiesV2\",\"category\":\"Git\",\"target\":\"wh\",\"value\":\"xsure\",\"valueFormat\":\"JSON\"},\"id\":\"hzzbgullcxiqq\",\"name\":\"jkoxdupna\",\"type\":\"gl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workspaceConnections() - .list("idb", "pglhzqp", "zbawkikcdgfh", "ssdpjeyoqxded", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ConnectionCategory.GIT, response.iterator().next().properties().category()); - Assertions.assertEquals("wh", response.iterator().next().properties().target()); - Assertions.assertEquals("xsure", response.iterator().next().properties().value()); - Assertions.assertEquals(ValueFormat.JSON, response.iterator().next().properties().valueFormat()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java deleted file mode 100644 index 3bcd57ce35a5..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceFeaturesListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.AmlUserFeature; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceFeaturesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"id\":\"kekzouyveww\",\"displayName\":\"rd\",\"description\":\"gldohgcandxfhh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.workspaceFeatures().list("wbmwdukinhl", "hg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kekzouyveww", response.iterator().next().id()); - Assertions.assertEquals("rd", response.iterator().next().displayName()); - Assertions.assertEquals("gldohgcandxfhh", response.iterator().next().description()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java deleted file mode 100644 index e359ec0f65d2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacePropertiesUpdateParametersTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.fluent.models.WorkspacePropertiesUpdateParameters; -import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import org.junit.jupiter.api.Assertions; - -public final class WorkspacePropertiesUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspacePropertiesUpdateParameters model = - BinaryData - .fromString( - "{\"description\":\"qfou\",\"friendlyName\":\"mmnkzsmodmgl\",\"imageBuildCompute\":\"gpbkwtmut\",\"serviceManagedResourcesSettings\":{\"cosmosDb\":{\"collectionsThroughput\":289494577}},\"primaryUserAssignedIdentity\":\"pspwgcuertu\",\"publicNetworkAccess\":\"Disabled\",\"applicationInsights\":\"svqwhbmdgbbjfd\",\"containerRegistry\":\"mbmbexppbh\"}") - .toObject(WorkspacePropertiesUpdateParameters.class); - Assertions.assertEquals("qfou", model.description()); - Assertions.assertEquals("mmnkzsmodmgl", model.friendlyName()); - Assertions.assertEquals("gpbkwtmut", model.imageBuildCompute()); - Assertions.assertEquals(289494577, model.serviceManagedResourcesSettings().cosmosDb().collectionsThroughput()); - Assertions.assertEquals("pspwgcuertu", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.applicationInsights()); - Assertions.assertEquals("mbmbexppbh", model.containerRegistry()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspacePropertiesUpdateParameters model = - new WorkspacePropertiesUpdateParameters() - .withDescription("qfou") - .withFriendlyName("mmnkzsmodmgl") - .withImageBuildCompute("gpbkwtmut") - .withServiceManagedResourcesSettings( - new ServiceManagedResourcesSettings() - .withCosmosDb(new CosmosDbSettings().withCollectionsThroughput(289494577))) - .withPrimaryUserAssignedIdentity("pspwgcuertu") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withApplicationInsights("svqwhbmdgbbjfd") - .withContainerRegistry("mbmbexppbh"); - model = BinaryData.fromObject(model).toObject(WorkspacePropertiesUpdateParameters.class); - Assertions.assertEquals("qfou", model.description()); - Assertions.assertEquals("mmnkzsmodmgl", model.friendlyName()); - Assertions.assertEquals("gpbkwtmut", model.imageBuildCompute()); - Assertions.assertEquals(289494577, model.serviceManagedResourcesSettings().cosmosDb().collectionsThroughput()); - Assertions.assertEquals("pspwgcuertu", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("svqwhbmdgbbjfd", model.applicationInsights()); - Assertions.assertEquals("mbmbexppbh", model.containerRegistry()); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java deleted file mode 100644 index 1a2853961942..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspaceUpdateParametersTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentity; -import com.azure.resourcemanager.machinelearning.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.machinelearning.models.PublicNetworkAccess; -import com.azure.resourcemanager.machinelearning.models.ServiceManagedResourcesSettings; -import com.azure.resourcemanager.machinelearning.models.Sku; -import com.azure.resourcemanager.machinelearning.models.SkuTier; -import com.azure.resourcemanager.machinelearning.models.UserAssignedIdentity; -import com.azure.resourcemanager.machinelearning.models.WorkspaceUpdateParameters; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceUpdateParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceUpdateParameters model = - BinaryData - .fromString( - "{\"tags\":{\"yqduujit\":\"mgxsab\",\"rwpdappdsbdkvwrw\":\"jczdzevndh\"},\"sku\":{\"name\":\"eusnhutj\",\"tier\":\"Premium\",\"size\":\"rl\",\"family\":\"ugjzzdatqxhocdge\",\"capacity\":1293628182},\"identity\":{\"principalId\":\"1766dab0-b6cc-422f-8a7a-5b439fec6fab\",\"tenantId\":\"31064613-1bc8-43cc-a67e-db3b41e6f75c\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"dvkaozw\":{\"principalId\":\"47285ad5-2fb1-4802-9800-ef15b64c9005\",\"clientId\":\"3461706a-d43b-4f70-a1e5-f37623e988fb\"},\"tyhxhurokft\":{\"principalId\":\"141163eb-a84e-4057-876d-ef2ca332a35a\",\"clientId\":\"61aace7e-3ef4-41e3-a5f3-cb34b3814d76\"},\"lniwpwcukjfkgiaw\":{\"principalId\":\"d961710b-4bea-4db4-ae21-054935aa3b87\",\"clientId\":\"52a95018-46dd-4fa9-860b-f8dafc12a373\"},\"ryplwckbasyypn\":{\"principalId\":\"14d938eb-6659-4bd4-b080-10c086f54a8e\",\"clientId\":\"a92d70a9-dbe7-4b71-a2b5-0096f3797152\"}}},\"properties\":{\"description\":\"sgcbac\",\"friendlyName\":\"ejk\",\"imageBuildCompute\":\"ynqgoulzndlikwyq\",\"serviceManagedResourcesSettings\":{},\"primaryUserAssignedIdentity\":\"ibmadgakeqsrxy\",\"publicNetworkAccess\":\"Disabled\",\"applicationInsights\":\"e\",\"containerRegistry\":\"ytb\"}}") - .toObject(WorkspaceUpdateParameters.class); - Assertions.assertEquals("mgxsab", model.tags().get("yqduujit")); - Assertions.assertEquals("eusnhutj", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("rl", model.sku().size()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.sku().family()); - Assertions.assertEquals(1293628182, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("sgcbac", model.description()); - Assertions.assertEquals("ejk", model.friendlyName()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.imageBuildCompute()); - Assertions.assertEquals("ibmadgakeqsrxy", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("e", model.applicationInsights()); - Assertions.assertEquals("ytb", model.containerRegistry()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceUpdateParameters model = - new WorkspaceUpdateParameters() - .withTags(mapOf("yqduujit", "mgxsab", "rwpdappdsbdkvwrw", "jczdzevndh")) - .withSku( - new Sku() - .withName("eusnhutj") - .withTier(SkuTier.PREMIUM) - .withSize("rl") - .withFamily("ugjzzdatqxhocdge") - .withCapacity(1293628182)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "dvkaozw", - new UserAssignedIdentity(), - "tyhxhurokft", - new UserAssignedIdentity(), - "lniwpwcukjfkgiaw", - new UserAssignedIdentity(), - "ryplwckbasyypn", - new UserAssignedIdentity()))) - .withDescription("sgcbac") - .withFriendlyName("ejk") - .withImageBuildCompute("ynqgoulzndlikwyq") - .withServiceManagedResourcesSettings(new ServiceManagedResourcesSettings()) - .withPrimaryUserAssignedIdentity("ibmadgakeqsrxy") - .withPublicNetworkAccess(PublicNetworkAccess.DISABLED) - .withApplicationInsights("e") - .withContainerRegistry("ytb"); - model = BinaryData.fromObject(model).toObject(WorkspaceUpdateParameters.class); - Assertions.assertEquals("mgxsab", model.tags().get("yqduujit")); - Assertions.assertEquals("eusnhutj", model.sku().name()); - Assertions.assertEquals(SkuTier.PREMIUM, model.sku().tier()); - Assertions.assertEquals("rl", model.sku().size()); - Assertions.assertEquals("ugjzzdatqxhocdge", model.sku().family()); - Assertions.assertEquals(1293628182, model.sku().capacity()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("sgcbac", model.description()); - Assertions.assertEquals("ejk", model.friendlyName()); - Assertions.assertEquals("ynqgoulzndlikwyq", model.imageBuildCompute()); - Assertions.assertEquals("ibmadgakeqsrxy", model.primaryUserAssignedIdentity()); - Assertions.assertEquals(PublicNetworkAccess.DISABLED, model.publicNetworkAccess()); - Assertions.assertEquals("e", model.applicationInsights()); - Assertions.assertEquals("ytb", model.containerRegistry()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java deleted file mode 100644 index da2945081925..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().delete("f", "huwzbxpcqzgi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java deleted file mode 100644 index e7f07d55c9f2..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import com.azure.resourcemanager.machinelearning.models.ExternalFqdnResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ExternalFqdnResponse response = - manager - .workspaces() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "ffffg", "uhznwhvuldbk", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java b/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java deleted file mode 100644 index 3b0b7388c4bd..000000000000 --- a/sdk/machinelearning/azure-resourcemanager-machinelearning/src/test/java/com/azure/resourcemanager/machinelearning/generated/WorkspacesResyncKeysMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.machinelearning.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.machinelearning.MachineLearningManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspacesResyncKeysMockTests { - @Test - public void testResyncKeys() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - MachineLearningManager manager = - MachineLearningManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaces().resyncKeys("ygzqpjoisfmn", "ybdjnxumentq", com.azure.core.util.Context.NONE); - } -}